Ashoka74 commited on
Commit
1c2a234
1 Parent(s): 3e7a57f

Update app_merged.py

Browse files
Files changed (1) hide show
  1. app_merged.py +28 -28
app_merged.py CHANGED
@@ -102,27 +102,27 @@ transform_image = transforms.Compose(
102
  # Load
103
 
104
  # Model paths
105
- # model_path = './models/iclight_sd15_fc.safetensors'
106
- # model_path2 = './checkpoints/depth_anything_v2_vits.pth'
107
- # model_path3 = './checkpoints/sam2_hiera_large.pt'
108
- # model_path4 = './checkpoints/config.json'
109
- # model_path5 = './checkpoints/preprocessor_config.json'
110
- # model_path6 = './configs/sam2_hiera_l.yaml'
111
- # model_path7 = './mvadapter_i2mv_sdxl.safetensors'
112
-
113
- # # Base URL for the repository
114
- # BASE_URL = 'https://huggingface.co/Ashoka74/Placement/resolve/main/'
115
-
116
- # # Model URLs
117
- # model_urls = {
118
- # model_path: 'iclight_sd15_fc.safetensors',
119
- # model_path2: 'depth_anything_v2_vits.pth',
120
- # model_path3: 'sam2_hiera_large.pt',
121
- # model_path4: 'config.json',
122
- # model_path5: 'preprocessor_config.json',
123
- # model_path6: 'sam2_hiera_l.yaml',
124
- # model_path7: 'mvadapter_i2mv_sdxl.safetensors'
125
- # }
126
 
127
  # Ensure directories exist
128
  def ensure_directories():
@@ -141,18 +141,18 @@ def download_models():
141
  except Exception as e:
142
  print(f"Error downloading {filename}: {e}")
143
 
144
- # ensure_directories()
145
 
146
- # download_models()
147
 
148
 
149
 
150
 
151
- # hf_hub_download(repo_id="black-forest-labs/FLUX.1-Redux-dev", filename="flux1-redux-dev.safetensors", local_dir="models/style_models")
152
- # hf_hub_download(repo_id="black-forest-labs/FLUX.1-Depth-dev", filename="flux1-depth-dev.safetensors", local_dir="models/diffusion_models")
153
- # hf_hub_download(repo_id="Comfy-Org/sigclip_vision_384", filename="sigclip_vision_patch14_384.safetensors", local_dir="models/clip_vision")
154
- # hf_hub_download(repo_id="Kijai/DepthAnythingV2-safetensors", filename="depth_anything_v2_vitl_fp32.safetensors", local_dir="models/depthanything")
155
- # hf_hub_download(repo_id="black-forest-labs/FLUX.1-dev", filename="ae.safetensors", local_dir="models/vae/FLUX1")
156
  hf_hub_download(repo_id="comfyanonymous/flux_text_encoders", filename="clip_l.safetensors", local_dir="models/text_encoders")
157
  t5_path = hf_hub_download(repo_id="comfyanonymous/flux_text_encoders", filename="t5xxl_fp16.safetensors", local_dir="models/text_encoders/t5")
158
 
 
102
  # Load
103
 
104
  # Model paths
105
+ model_path = './models/iclight_sd15_fc.safetensors'
106
+ model_path2 = './checkpoints/depth_anything_v2_vits.pth'
107
+ model_path3 = './checkpoints/sam2_hiera_large.pt'
108
+ model_path4 = './checkpoints/config.json'
109
+ model_path5 = './checkpoints/preprocessor_config.json'
110
+ model_path6 = './configs/sam2_hiera_l.yaml'
111
+ model_path7 = './mvadapter_i2mv_sdxl.safetensors'
112
+
113
+ # Base URL for the repository
114
+ BASE_URL = 'https://huggingface.co/Ashoka74/Placement/resolve/main/'
115
+
116
+ # Model URLs
117
+ model_urls = {
118
+ model_path: 'iclight_sd15_fc.safetensors',
119
+ model_path2: 'depth_anything_v2_vits.pth',
120
+ model_path3: 'sam2_hiera_large.pt',
121
+ model_path4: 'config.json',
122
+ model_path5: 'preprocessor_config.json',
123
+ model_path6: 'sam2_hiera_l.yaml',
124
+ model_path7: 'mvadapter_i2mv_sdxl.safetensors'
125
+ }
126
 
127
  # Ensure directories exist
128
  def ensure_directories():
 
141
  except Exception as e:
142
  print(f"Error downloading {filename}: {e}")
143
 
144
+ ensure_directories()
145
 
146
+ download_models()
147
 
148
 
149
 
150
 
151
+ hf_hub_download(repo_id="black-forest-labs/FLUX.1-Redux-dev", filename="flux1-redux-dev.safetensors", local_dir="models/style_models")
152
+ hf_hub_download(repo_id="black-forest-labs/FLUX.1-Depth-dev", filename="flux1-depth-dev.safetensors", local_dir="models/diffusion_models")
153
+ hf_hub_download(repo_id="Comfy-Org/sigclip_vision_384", filename="sigclip_vision_patch14_384.safetensors", local_dir="models/clip_vision")
154
+ hf_hub_download(repo_id="Kijai/DepthAnythingV2-safetensors", filename="depth_anything_v2_vitl_fp32.safetensors", local_dir="models/depthanything")
155
+ hf_hub_download(repo_id="black-forest-labs/FLUX.1-dev", filename="ae.safetensors", local_dir="models/vae/FLUX1")
156
  hf_hub_download(repo_id="comfyanonymous/flux_text_encoders", filename="clip_l.safetensors", local_dir="models/text_encoders")
157
  t5_path = hf_hub_download(repo_id="comfyanonymous/flux_text_encoders", filename="t5xxl_fp16.safetensors", local_dir="models/text_encoders/t5")
158