jiuface commited on
Commit
097272d
·
verified ·
1 Parent(s): 9f830e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -23,6 +23,7 @@ import json
23
  import random
24
  import string
25
  from diffusers import FluxPipeline
 
26
 
27
 
28
  # Login Hugging Face Hub
@@ -158,7 +159,7 @@ def run_lora(prompt, image_url, lora_strings_json, image_strength, cfg_scale, s
158
  if lora_repo and weights and adapter_name:
159
  try:
160
  #txt2img_pipe.to(device)
161
- txt2img_pipe.load_lora_weights(lora_repo, weight_name=weights, adapter_name=lora_name)
162
  except:
163
  print("load lora error")
164
 
 
23
  import random
24
  import string
25
  from diffusers import FluxPipeline
26
+ from huggingface_hub import hf_hub_download
27
 
28
 
29
  # Login Hugging Face Hub
 
159
  if lora_repo and weights and adapter_name:
160
  try:
161
  #txt2img_pipe.to(device)
162
+ txt2img_pipe.load_lora_weights(hf_hub_download(lora_repo, weights), adapter_name=lora_name
163
  except:
164
  print("load lora error")
165