Spaces:
Runtime error
Runtime error
gbarbadillo
commited on
Commit
·
e3f1149
1
Parent(s):
3010a51
fixed bug in path
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from huggingface_hub import hf_hub_download
|
|
| 10 |
|
| 11 |
base_model_path = "SG161222/Realistic_Vision_V4.0_noVAE"
|
| 12 |
vae_model_path = "stabilityai/sd-vae-ft-mse"
|
| 13 |
-
image_encoder_path = "
|
| 14 |
ip_ckpt = "IP-Adapter-FaceID/ip-adapter-faceid-plus_sd15.bin"
|
| 15 |
|
| 16 |
|
|
@@ -41,18 +41,19 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
| 41 |
safety_checker=None
|
| 42 |
)
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
ip_model = IPAdapterFaceIDPlus(pipe, image_encoder_path, ip_ckpt, device, num_tokens=4, torch_dtype=torch_dtype)
|
|
|
|
| 10 |
|
| 11 |
base_model_path = "SG161222/Realistic_Vision_V4.0_noVAE"
|
| 12 |
vae_model_path = "stabilityai/sd-vae-ft-mse"
|
| 13 |
+
image_encoder_path = "IP-Adapter/models/image_encoder"
|
| 14 |
ip_ckpt = "IP-Adapter-FaceID/ip-adapter-faceid-plus_sd15.bin"
|
| 15 |
|
| 16 |
|
|
|
|
| 41 |
safety_checker=None
|
| 42 |
)
|
| 43 |
|
| 44 |
+
def download_models():
|
| 45 |
+
hf_hub_download(
|
| 46 |
+
repo_id='h94/IP-Adapter-FaceID',
|
| 47 |
+
filename='ip-adapter-faceid-plus_sd15.bin',
|
| 48 |
+
local_dir='IP-Adapter-FaceID')
|
| 49 |
+
hf_hub_download(
|
| 50 |
+
repo_id='h94/IP-Adapter',
|
| 51 |
+
filename='models/image_encoder/config.json',
|
| 52 |
+
local_dir='IP-Adapter')
|
| 53 |
+
hf_hub_download(
|
| 54 |
+
repo_id='h94/IP-Adapter',
|
| 55 |
+
filename='models/image_encoder/pytorch_model.bin',
|
| 56 |
+
local_dir='IP-Adapter')
|
| 57 |
|
| 58 |
|
| 59 |
ip_model = IPAdapterFaceIDPlus(pipe, image_encoder_path, ip_ckpt, device, num_tokens=4, torch_dtype=torch_dtype)
|