Spaces:
Running
on
Zero
Running
on
Zero
AlekseyCalvin
commited on
Commit
•
a10dcba
1
Parent(s):
b9597b2
Update app.py
Browse files
app.py
CHANGED
@@ -140,13 +140,10 @@ def run_lora(prompt, negative_prompt, cfg_scale, steps, selected_index, randomiz
|
|
140 |
# Load LoRA weights
|
141 |
with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
|
142 |
if "weights" in selected_lora:
|
143 |
-
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
144 |
-
pipe.
|
145 |
-
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
146 |
-
|
147 |
else:
|
148 |
-
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
149 |
-
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
150 |
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
151 |
|
152 |
# Set random seed for reproducibility
|
|
|
140 |
# Load LoRA weights
|
141 |
with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
|
142 |
if "weights" in selected_lora:
|
143 |
+
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast"), adapter_weights=[1.0])
|
144 |
+
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], adapter_weights=[lora_scale])
|
|
|
|
|
145 |
else:
|
146 |
+
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast", adapter_weights=[1.0])
|
|
|
147 |
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
148 |
|
149 |
# Set random seed for reproducibility
|