gbarbadillo commited on
Commit
e3f1149
1 Parent(s): 3010a51

fixed bug in path

Browse files
Files changed (1) hide show
  1. app.py +14 -13
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 = "h94/IP-Adapter/models/image_encoder"
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
- hf_hub_download(
45
- repo_id='h94/IP-Adapter-FaceID',
46
- filename='ip-adapter-faceid-plus_sd15.bin',
47
- local_dir='IP-Adapter-FaceID')
48
- hf_hub_download(
49
- repo_id='h94/IP-Adapter',
50
- filename='models/image_encoder/config.json',
51
- local_dir='IP-Adapter')
52
- hf_hub_download(
53
- repo_id='h94/IP-Adapter',
54
- filename='models/image_encoder/pytorch_model.bin',
55
- local_dir='IP-Adapter');
 
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)