Spaces:
Paused
Paused
Commit
·
3c240aa
1
Parent(s):
a4c9d6e
Update app.py
Browse files
app.py
CHANGED
|
@@ -149,14 +149,15 @@ def run_lora(prompt, negative, lora_scale, selected_state, progress=gr.Progress(
|
|
| 149 |
loaded_state_dict = sdxl_loras[selected_state.index]["state_dict"]
|
| 150 |
cross_attention_kwargs = None
|
| 151 |
if last_lora != repo_name:
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
|
|
|
| 160 |
is_compatible = sdxl_loras[selected_state.index]["is_compatible"]
|
| 161 |
|
| 162 |
if is_compatible:
|
|
|
|
| 149 |
loaded_state_dict = sdxl_loras[selected_state.index]["state_dict"]
|
| 150 |
cross_attention_kwargs = None
|
| 151 |
if last_lora != repo_name:
|
| 152 |
+
pipe = copy.deepcopy(original_pipe)
|
| 153 |
+
pipe.to(device)
|
| 154 |
+
#if last_merged:
|
| 155 |
+
# del pipe
|
| 156 |
+
# gc.collect()
|
| 157 |
+
|
| 158 |
+
#elif(last_fused):
|
| 159 |
+
# pipe.unfuse_lora()
|
| 160 |
+
# pipe.unload_lora_weights()
|
| 161 |
is_compatible = sdxl_loras[selected_state.index]["is_compatible"]
|
| 162 |
|
| 163 |
if is_compatible:
|