yupeng.zhou commited on
Commit
bbaf4dc
1 Parent(s): 263c046
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -26,6 +26,7 @@ import torch.nn.functional as F
26
  from utils.gradio_utils import cal_attn_mask_xl
27
  import copy
28
  import os
 
29
  from diffusers.utils import load_image
30
  from utils.utils import get_comic
31
  from utils.style_template import styles
@@ -35,14 +36,14 @@ os.environ["no_proxy"] = "localhost,127.0.0.1,::1"
35
  STYLE_NAMES = list(styles.keys())
36
  DEFAULT_STYLE_NAME = "Japanese Anime"
37
  global models_dict
38
- use_va = False
39
  models_dict = {
40
  # "Juggernaut": "RunDiffusion/Juggernaut-XL-v8",
41
  # "RealVision": "SG161222/RealVisXL_V4.0" ,
42
  # "SDXL":"stabilityai/stable-diffusion-xl-base-1.0" ,
43
- "Unstable": "/mnt/bn/yupengdata2/projects/PhotoMaker/sdxl-unstable-diffusers-y"
44
  }
45
- photomaker_path = "/mnt/bn/yupengdata2/projects/PhotoMaker/photomaker-v1.bin"
46
  MAX_SEED = np.iinfo(np.int32).max
47
  def setup_seed(seed):
48
  torch.manual_seed(seed)
 
26
  from utils.gradio_utils import cal_attn_mask_xl
27
  import copy
28
  import os
29
+ from huggingface_hub import hf_hub_download
30
  from diffusers.utils import load_image
31
  from utils.utils import get_comic
32
  from utils.style_template import styles
 
36
  STYLE_NAMES = list(styles.keys())
37
  DEFAULT_STYLE_NAME = "Japanese Anime"
38
  global models_dict
39
+ use_va = True
40
  models_dict = {
41
  # "Juggernaut": "RunDiffusion/Juggernaut-XL-v8",
42
  # "RealVision": "SG161222/RealVisXL_V4.0" ,
43
  # "SDXL":"stabilityai/stable-diffusion-xl-base-1.0" ,
44
+ "Unstable": "stablediffusionapi/sdxl-unstable-diffusers-y"
45
  }
46
+ photomaker_path = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v1.bin", repo_type="model")
47
  MAX_SEED = np.iinfo(np.int32).max
48
  def setup_seed(seed):
49
  torch.manual_seed(seed)