AlekseyCalvin commited on
Commit
52dfea4
1 Parent(s): c4064b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import json
3
  import logging
@@ -105,10 +106,10 @@ def run_lora(prompt, negative_prompt, cfg_scale, steps, selected_index, randomiz
105
  with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
106
  if "weights" in selected_lora:
107
  pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"])
108
- pipe.fuse_lora(lora_scale=1.0)
109
  else:
110
  pipe.load_lora_weights(lora_path)
111
- pipe.fuse_lora(lora_scale=1.0)
112
 
113
  # Set random seed for reproducibility
114
  with calculateDuration("Randomizing seed"):
 
1
+ import os
2
  import gradio as gr
3
  import json
4
  import logging
 
106
  with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
107
  if "weights" in selected_lora:
108
  pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"])
109
+ pipe.fuse_lora(lora_scale=lora_scale)
110
  else:
111
  pipe.load_lora_weights(lora_path)
112
+ pipe.fuse_lora(lora_scale=lora_scale)
113
 
114
  # Set random seed for reproducibility
115
  with calculateDuration("Randomizing seed"):