Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -162,18 +162,18 @@ app.prepare(ctx_id=0, det_size=(640, 640))
|
|
162 |
|
163 |
|
164 |
# download checkpoints
|
165 |
-
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="checkpoint_105000/controlnet/config.json", local_dir="./
|
166 |
-
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="checkpoint_105000/controlnet/diffusion_pytorch_model.safetensors", local_dir="./
|
167 |
-
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="checkpoint_105000/ip-adapter.bin", local_dir="./
|
168 |
-
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="image_encoder/pytorch_model.bin", local_dir="./
|
169 |
-
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="image_encoder/config.json", local_dir="./
|
170 |
|
171 |
|
172 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
173 |
|
174 |
# ckpts paths
|
175 |
-
face_adapter = f"./
|
176 |
-
controlnet_path = f"./
|
177 |
base_model_path = f'briaai/BRIA-2.3'
|
178 |
resolution = 1024
|
179 |
|
@@ -186,7 +186,7 @@ controlnet = [controlnet_lnmks, controlnet_canny]
|
|
186 |
|
187 |
|
188 |
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
|
189 |
-
f"./
|
190 |
torch_dtype=torch.float16,
|
191 |
)
|
192 |
pipe = StableDiffusionXLInstantIDPipeline.from_pretrained(
|
|
|
162 |
|
163 |
|
164 |
# download checkpoints
|
165 |
+
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="checkpoint_105000/controlnet/config.json", local_dir="./checkpoints2")
|
166 |
+
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="checkpoint_105000/controlnet/diffusion_pytorch_model.safetensors", local_dir="./checkpoints2")
|
167 |
+
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="checkpoint_105000/ip-adapter.bin", local_dir="./checkpoints2")
|
168 |
+
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="image_encoder/pytorch_model.bin", local_dir="./checkpoints2")
|
169 |
+
hf_hub_download(repo_id="briaai/ID_preservation_2.3_auraFaceEnc", filename="image_encoder/config.json", local_dir="./checkpoints2")
|
170 |
|
171 |
|
172 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
173 |
|
174 |
# ckpts paths
|
175 |
+
face_adapter = f"./checkpoints2/ip-adapter.bin"
|
176 |
+
controlnet_path = f"./checkpoints2/controlnet"
|
177 |
base_model_path = f'briaai/BRIA-2.3'
|
178 |
resolution = 1024
|
179 |
|
|
|
186 |
|
187 |
|
188 |
image_encoder = CLIPVisionModelWithProjection.from_pretrained(
|
189 |
+
f"./checkpoints2/image_encoder",
|
190 |
torch_dtype=torch.float16,
|
191 |
)
|
192 |
pipe = StableDiffusionXLInstantIDPipeline.from_pretrained(
|