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