Add LoRA scale to full LoRA also

#17
by multimodalart HF Staff - opened
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -284,8 +284,10 @@ def process_adapter_generation(prompt, cfg_scale, steps, selected_index, randomi
284
  pipe.load_lora_weights(
285
  lora_path,
286
  weight_name=weight_name,
287
- low_cpu_mem_usage=True
 
288
  )
 
289
 
290
  # Set random seed for reproducibility
291
  with Timer("Randomizing seed"):
 
284
  pipe.load_lora_weights(
285
  lora_path,
286
  weight_name=weight_name,
287
+ low_cpu_mem_usage=True,
288
+ adapter_name="style"
289
  )
290
+ pipe.set_adapters(["style"], adapter_weights=[lora_scale])
291
 
292
  # Set random seed for reproducibility
293
  with Timer("Randomizing seed"):