Spaces:
Running
on
Zero
Running
on
Zero
AlekseyCalvin
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -155,7 +155,7 @@ def run_lora(prompt, negative_prompt, cfg_scale, steps, selected_index, seed, wi
|
|
155 |
if "weights" in selected_lora:
|
156 |
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], lora_scale=[1.0], adapter_weights=lora_scale)
|
157 |
else:
|
158 |
-
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], lora_scale=[1.0], adapter_weights=
|
159 |
# Load LoRA weights
|
160 |
# with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
|
161 |
# if "weights" in selected_lora:
|
@@ -235,7 +235,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as app:
|
|
235 |
|
236 |
with gr.Row():
|
237 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
238 |
-
lora_scale = gr.Slider(label="LoRA Scale", minimum=0, maximum=2.0, step=0.01, value=1.0)
|
239 |
|
240 |
gallery.select(
|
241 |
update_selection,
|
|
|
155 |
if "weights" in selected_lora:
|
156 |
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], lora_scale=[1.0], adapter_weights=lora_scale)
|
157 |
else:
|
158 |
+
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], lora_scale=[1.0], adapter_weights=["scale"])
|
159 |
# Load LoRA weights
|
160 |
# with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
|
161 |
# if "weights" in selected_lora:
|
|
|
235 |
|
236 |
with gr.Row():
|
237 |
seed = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=0, randomize=True)
|
238 |
+
lora_scale = gr.Slider(label="LoRA Scale", minimum=0.2, maximum=2.0, step=0.01, value=1.0)
|
239 |
|
240 |
gallery.select(
|
241 |
update_selection,
|