Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -155,15 +155,15 @@ def run_lora(prompt, image_url, lora_strings_json, image_strength, cfg_scale, s
|
|
155 |
adapter_weights.append(adapter_weight)
|
156 |
if lora_repo and weights and adapter_name:
|
157 |
try:
|
158 |
-
txt2img_pipe.to(device)
|
159 |
txt2img_pipe.load_lora_weights(lora_repo, weight_name=weights, adapter_name=lora_name)
|
160 |
except:
|
161 |
print("load lora error")
|
162 |
|
163 |
# set lora weights
|
164 |
-
if len(lora_names) > 0:
|
165 |
-
txt2img_pipe.to(device)
|
166 |
-
txt2img_pipe.set_adapters(lora_names, adapter_weights=adapter_weights)
|
167 |
|
168 |
# Generate image
|
169 |
error_message = ""
|
|
|
155 |
adapter_weights.append(adapter_weight)
|
156 |
if lora_repo and weights and adapter_name:
|
157 |
try:
|
158 |
+
#txt2img_pipe.to(device)
|
159 |
txt2img_pipe.load_lora_weights(lora_repo, weight_name=weights, adapter_name=lora_name)
|
160 |
except:
|
161 |
print("load lora error")
|
162 |
|
163 |
# set lora weights
|
164 |
+
#if len(lora_names) > 0:
|
165 |
+
#txt2img_pipe.to(device)
|
166 |
+
#txt2img_pipe.set_adapters(lora_names, adapter_weights=adapter_weights)
|
167 |
|
168 |
# Generate image
|
169 |
error_message = ""
|