Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -141,12 +141,13 @@ def run_lora(prompt, negative_prompt, cfg_scale, steps, selected_index, randomiz
|
|
| 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.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
| 145 |
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
|
|
|
|
|
|
| 146 |
else:
|
| 147 |
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
| 148 |
-
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
| 149 |
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
|
|
|
| 150 |
|
| 151 |
# Set random seed for reproducibility
|
| 152 |
with calculateDuration("Randomizing seed"):
|
|
|
|
| 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.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
| 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
|
| 153 |
with calculateDuration("Randomizing seed"):
|