jiuface commited on
Commit
1622fbb
·
verified ·
1 Parent(s): 715a594

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -37,7 +37,7 @@ base_model = "black-forest-labs/FLUX.1-dev"
37
 
38
  # load pipe
39
 
40
- txt2img_pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype)
41
 
42
  txt2img_pipe = txt2img_pipe.to(device)
43
  txt2img_pipe.__class__.load_lora_into_transformer = classmethod(load_lora_into_transformer)
@@ -156,7 +156,7 @@ def run_lora(prompt, image_url, lora_strings_json, image_strength, cfg_scale, s
156
  adapter_weights.append(adapter_weight)
157
  if lora_repo and weights and adapter_name:
158
  try:
159
- txt2img_pipe.load_lora_weights(lora_repo, weight_name=weights, low_cpu_mem_usage=True, adapter_name=lora_name)
160
  except:
161
  print("load lora error")
162
 
 
37
 
38
  # load pipe
39
 
40
+ txt2img_pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype,low_cpu_mem_usage=False)
41
 
42
  txt2img_pipe = txt2img_pipe.to(device)
43
  txt2img_pipe.__class__.load_lora_into_transformer = classmethod(load_lora_into_transformer)
 
156
  adapter_weights.append(adapter_weight)
157
  if lora_repo and weights and adapter_name:
158
  try:
159
+ txt2img_pipe.load_lora_weights(lora_repo, weight_name=weights, adapter_name=lora_name)
160
  except:
161
  print("load lora error")
162