Upload 4 files
Browse files
convert_url_to_diffusers_sdxl.py
CHANGED
|
@@ -208,7 +208,7 @@ def fuse_loras(pipe, civitai_key="", lora_dict={}, temp_dir="."):
|
|
| 208 |
pipe.load_lora_weights(new_lora_file, weight_name = w_name, adapter_name = a_name)
|
| 209 |
a_list.append(a_name)
|
| 210 |
w_list.append(v)
|
| 211 |
-
if not a_list: return
|
| 212 |
pipe.set_adapters(a_list, adapter_weights=w_list)
|
| 213 |
pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
|
| 214 |
pipe.unload_lora_weights()
|
|
|
|
| 208 |
pipe.load_lora_weights(new_lora_file, weight_name = w_name, adapter_name = a_name)
|
| 209 |
a_list.append(a_name)
|
| 210 |
w_list.append(v)
|
| 211 |
+
if not a_list: return pipe
|
| 212 |
pipe.set_adapters(a_list, adapter_weights=w_list)
|
| 213 |
pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
|
| 214 |
pipe.unload_lora_weights()
|
convert_url_to_diffusers_sdxl_gr.py
CHANGED
|
@@ -237,7 +237,7 @@ def fuse_loras(pipe, lora_dict={}, temp_dir=".", civitai_key="", hf_token=""):
|
|
| 237 |
pipe.load_lora_weights(new_lora_file, weight_name = w_name, adapter_name = a_name)
|
| 238 |
a_list.append(a_name)
|
| 239 |
w_list.append(v)
|
| 240 |
-
if not a_list: return
|
| 241 |
pipe.set_adapters(a_list, adapter_weights=w_list)
|
| 242 |
pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
|
| 243 |
pipe.unload_lora_weights()
|
|
|
|
| 237 |
pipe.load_lora_weights(new_lora_file, weight_name = w_name, adapter_name = a_name)
|
| 238 |
a_list.append(a_name)
|
| 239 |
w_list.append(v)
|
| 240 |
+
if not a_list: return pipe
|
| 241 |
pipe.set_adapters(a_list, adapter_weights=w_list)
|
| 242 |
pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
|
| 243 |
pipe.unload_lora_weights()
|
local/convert_url_to_diffusers_sdxl.py
CHANGED
|
@@ -208,7 +208,7 @@ def fuse_loras(pipe, civitai_key="", lora_dict={}, temp_dir="."):
|
|
| 208 |
pipe.load_lora_weights(new_lora_file, weight_name = w_name, adapter_name = a_name)
|
| 209 |
a_list.append(a_name)
|
| 210 |
w_list.append(v)
|
| 211 |
-
if not a_list: return
|
| 212 |
pipe.set_adapters(a_list, adapter_weights=w_list)
|
| 213 |
pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
|
| 214 |
pipe.unload_lora_weights()
|
|
|
|
| 208 |
pipe.load_lora_weights(new_lora_file, weight_name = w_name, adapter_name = a_name)
|
| 209 |
a_list.append(a_name)
|
| 210 |
w_list.append(v)
|
| 211 |
+
if not a_list: return pipe
|
| 212 |
pipe.set_adapters(a_list, adapter_weights=w_list)
|
| 213 |
pipe.fuse_lora(adapter_names=a_list, lora_scale=1.0)
|
| 214 |
pipe.unload_lora_weights()
|