Paper99 commited on
Commit
d5415f5
1 Parent(s): 12a3126

Update download link

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,12 +19,12 @@ os.makedirs(civitai_model_path, exist_ok=True)
19
  base_model_name = "sdxlUnstableDiffusers_v11.safetensors"
20
  base_model_path = os.path.join(civitai_model_path, base_model_name)
21
  if not os.path.exists(base_model_path):
22
- base_model_path = hf_hub_download(repo_id="Paper99/sdxlUnstableDiffusers_v11", filename="sdxlUnstableDiffusers_v11.safetensors", repo_type="model")
23
 
24
  lora_model_name = "xl_more_art-full.safetensors"
25
  lora_path = os.path.join(civitai_model_path, lora_model_name)
26
  if not os.path.exists(lora_path):
27
- os.system(f'wget https://civitai.com/api/download/models/152309?type=Model&format=SafeTensor -O {lora_path}')
28
 
29
  # global variable
30
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -49,7 +49,7 @@ pipe.load_photomaker_adapter(
49
  )
50
 
51
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
52
- pipe.load_lora_weights(os.path.dirname(lora_path), weight_name=os.path.basename(lora_path), adapter_name="xl_more_art-full")
53
  pipe.set_adapters(["photomaker", "xl_more_art-full"], adapter_weights=[1.0, 0.5])
54
  pipe.fuse_lora()
55
 
 
19
  base_model_name = "sdxlUnstableDiffusers_v11.safetensors"
20
  base_model_path = os.path.join(civitai_model_path, base_model_name)
21
  if not os.path.exists(base_model_path):
22
+ base_model_path = hf_hub_download(repo_id="Paper99/sdxlUnstableDiffusers_v11", filename=base_model_name, repo_type="model")
23
 
24
  lora_model_name = "xl_more_art-full.safetensors"
25
  lora_path = os.path.join(civitai_model_path, lora_model_name)
26
  if not os.path.exists(lora_path):
27
+ lora_path = hf_hub_download(repo_id="Paper99/sdxlUnstableDiffusers_v11", filename=lora_model_name, repo_type="model")
28
 
29
  # global variable
30
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
49
  )
50
 
51
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
52
+ pipe.load_lora_weights(os.path.dirname(lora_path), weight_name=lora_model_name, adapter_name="xl_more_art-full")
53
  pipe.set_adapters(["photomaker", "xl_more_art-full"], adapter_weights=[1.0, 0.5])
54
  pipe.fuse_lora()
55