XuDongZhou commited on
Commit
ef580d7
·
verified ·
1 Parent(s): 4f7bfeb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -29,8 +29,10 @@ from utils.controlnet_xs import ControlNetXSAdapter
29
 
30
  import gradio as gr
31
 
32
- # import torch.nn.functional as F
33
- # from torchvision.transforms import Compose
 
 
34
 
35
  # global variable
36
  MAX_SEED = np.iinfo(np.int32).max
@@ -42,9 +44,9 @@ base_model = 'frankjoshua/realvisxlV40_v40Bakedvae'
42
  vae_path = 'madebyollin/sdxl-vae-fp16-fix'
43
  ckpt = 'RED-AIGC/InstantID-XS'
44
 
45
- image_proj_path = os.path.join(ckpt, "image_proj.bin")
46
- cnxs_path = os.path.join(ckpt, "controlnetxs.bin")
47
- cross_attn_path = os.path.join(ckpt, "cross_attn.bin")
48
 
49
 
50
  # Load face encoder
 
29
 
30
  import gradio as gr
31
 
32
+ hf_hub_download(repo_id="RED-AIGC/InstantID-XS", filename="controlnetxs.bin", local_dir="./ckpt")
33
+ hf_hub_download(repo_id="RED-AIGC/InstantID-XS",filename="cross_attn.bin",local_dir="./ckpt",)
34
+ hf_hub_download(repo_id="RED-AIGC/InstantID-XS", filename="image_proj.bin", local_dir="./ckpt")
35
+
36
 
37
  # global variable
38
  MAX_SEED = np.iinfo(np.int32).max
 
44
  vae_path = 'madebyollin/sdxl-vae-fp16-fix'
45
  ckpt = 'RED-AIGC/InstantID-XS'
46
 
47
+ image_proj_path = "./ckpt/image_proj.bin")
48
+ cnxs_path = "./ckpt/controlnetxs.bin")
49
+ cross_attn_path = "./ckpt/cross_attn.bin")
50
 
51
 
52
  # Load face encoder