Spaces:
Paused
Paused
Commit
•
9c7e38e
1
Parent(s):
1d38df8
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,10 @@ def run_lora(prompt, negative, lora_scale, steps, selected_state, sdxl_loras, sd
|
|
168 |
if last_lora != repo_name:
|
169 |
#if(last_fused):
|
170 |
#pipe.unfuse_lora()
|
171 |
-
|
|
|
|
|
|
|
172 |
pipe.set_adapters([sdxl_loras[selected_state.index]["repo"], "lcm_lora"], adapter_weights=[lora_scale, 1.0])
|
173 |
#last_fused = True
|
174 |
is_pivotal = sdxl_loras[selected_state.index]["is_pivotal"]
|
|
|
168 |
if last_lora != repo_name:
|
169 |
#if(last_fused):
|
170 |
#pipe.unfuse_lora()
|
171 |
+
try:
|
172 |
+
pipe.load_lora_weights(loaded_state_dict, adapter_name=sdxl_loras[selected_state.index]["repo"])
|
173 |
+
except:
|
174 |
+
print(sdxl_loras[selected_state.index]["repo"], " was loaded")
|
175 |
pipe.set_adapters([sdxl_loras[selected_state.index]["repo"], "lcm_lora"], adapter_weights=[lora_scale, 1.0])
|
176 |
#last_fused = True
|
177 |
is_pivotal = sdxl_loras[selected_state.index]["is_pivotal"]
|