Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -197,6 +197,9 @@ def load_loras(lora_strings_json:str):
|
|
197 |
adapter_weight = lora_info.get("adapter_weight")
|
198 |
if lora_repo and weights and adapter_name:
|
199 |
# load lora
|
|
|
|
|
|
|
200 |
if adapter_name in active_adapters:
|
201 |
print(f"Adapter '{adapter_name}' is already loaded, skipping.")
|
202 |
continue
|
@@ -206,8 +209,7 @@ def load_loras(lora_strings_json:str):
|
|
206 |
except ValueError as e:
|
207 |
print(f"Error loading LoRA adapter: {e}")
|
208 |
continue
|
209 |
-
|
210 |
-
adapter_weights.append(adapter_weight)
|
211 |
# set lora weights
|
212 |
if len(adapter_names) > 0:
|
213 |
pipe.set_adapters(adapter_names, adapter_weights=adapter_weights)
|
|
|
197 |
adapter_weight = lora_info.get("adapter_weight")
|
198 |
if lora_repo and weights and adapter_name:
|
199 |
# load lora
|
200 |
+
adapter_names.append(adapter_name)
|
201 |
+
adapter_weights.append(adapter_weight)
|
202 |
+
|
203 |
if adapter_name in active_adapters:
|
204 |
print(f"Adapter '{adapter_name}' is already loaded, skipping.")
|
205 |
continue
|
|
|
209 |
except ValueError as e:
|
210 |
print(f"Error loading LoRA adapter: {e}")
|
211 |
continue
|
212 |
+
|
|
|
213 |
# set lora weights
|
214 |
if len(adapter_names) > 0:
|
215 |
pipe.set_adapters(adapter_names, adapter_weights=adapter_weights)
|