multimodalart HF staff commited on
Commit
3b6af48
1 Parent(s): ce1c1c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -116,9 +116,9 @@ def merge_and_run(prompt, negative_prompt, shuffled_items, lora_1_scale=0.5, lor
116
  pipe.to("cuda")
117
  start_time = time()
118
  print("Loading LoRA weights...")
119
- pipe.load_lora_weights(state_dict_1)
120
  pipe.fuse_lora(lora_1_scale)
121
- pipe.load_lora_weights(state_dict_2)
122
  pipe.fuse_lora(lora_2_scale)
123
  lora_time = time() - start_time
124
  print(f"Loaded LoRAs time: {lora_time}")
 
116
  pipe.to("cuda")
117
  start_time = time()
118
  print("Loading LoRA weights...")
119
+ pipe.load_lora_weights(state_dict_1, low_cpu_mem_usage=True)
120
  pipe.fuse_lora(lora_1_scale)
121
+ pipe.load_lora_weights(state_dict_2, low_cpu_mem_usage=True)
122
  pipe.fuse_lora(lora_2_scale)
123
  lora_time = time() - start_time
124
  print(f"Loaded LoRAs time: {lora_time}")