Spaces:
Runtime error
Runtime error
Update app_merged.py
Browse files- app_merged.py +30 -27
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 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
}
|
126 |
|
127 |
# Ensure directories exist
|
128 |
def ensure_directories():
|
@@ -148,11 +148,11 @@ download_models()
|
|
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 |
|
@@ -495,7 +495,10 @@ dpmpp_2m_sde_karras_scheduler = DPMSolverMultistepScheduler(
|
|
495 |
|
496 |
|
497 |
fill_pipe = FluxFillPipeline.from_single_file(
|
498 |
-
"https://huggingface.co/SporkySporkness/FLUX.1-Fill-dev-GGUF/flux1-fill-dev-fp16-Q5_0-GGUF.gguf",
|
|
|
|
|
|
|
499 |
).to("cuda")
|
500 |
|
501 |
|
|
|
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():
|
|
|
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 |
|
|
|
495 |
|
496 |
|
497 |
fill_pipe = FluxFillPipeline.from_single_file(
|
498 |
+
"https://huggingface.co/SporkySporkness/FLUX.1-Fill-dev-GGUF/flux1-fill-dev-fp16-Q5_0-GGUF.gguf",
|
499 |
+
text_encoder= text_encoder,
|
500 |
+
text_encoder_2 = t5_path,
|
501 |
+
torch_dtype=torch.bfloat16
|
502 |
).to("cuda")
|
503 |
|
504 |
|