Spaces:
Running
Running
Upload 4 files
Browse files
convert_url_to_diffusers_sdxl.py
CHANGED
@@ -212,6 +212,7 @@ def fuse_loras(pipe, civitai_key="", lora_dict={}, temp_dir="."):
|
|
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()
|
|
|
215 |
|
216 |
|
217 |
def convert_url_to_diffusers_sdxl(url, civitai_key="", half=True, vae=None, scheduler="Euler a", lora_dict={}):
|
@@ -248,7 +249,7 @@ def convert_url_to_diffusers_sdxl(url, civitai_key="", half=True, vae=None, sche
|
|
248 |
elif new_vae_file:
|
249 |
pipe.vae = AutoencoderKL.from_single_file(new_vae_file)
|
250 |
|
251 |
-
fuse_loras(pipe, lora_dict, temp_dir, civitai_key)
|
252 |
|
253 |
sconf = get_scheduler_config(scheduler)
|
254 |
pipe.scheduler = sconf[0].from_config(pipe.scheduler.config, **sconf[1])
|
|
|
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()
|
215 |
+
return pipe
|
216 |
|
217 |
|
218 |
def convert_url_to_diffusers_sdxl(url, civitai_key="", half=True, vae=None, scheduler="Euler a", lora_dict={}):
|
|
|
249 |
elif new_vae_file:
|
250 |
pipe.vae = AutoencoderKL.from_single_file(new_vae_file)
|
251 |
|
252 |
+
pipe = fuse_loras(pipe, lora_dict, temp_dir, civitai_key)
|
253 |
|
254 |
sconf = get_scheduler_config(scheduler)
|
255 |
pipe.scheduler = sconf[0].from_config(pipe.scheduler.config, **sconf[1])
|
convert_url_to_diffusers_sdxl_gr.py
CHANGED
@@ -241,6 +241,7 @@ def fuse_loras(pipe, lora_dict={}, temp_dir=".", civitai_key="", hf_token=""):
|
|
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()
|
|
|
244 |
|
245 |
|
246 |
def convert_url_to_diffusers_sdxl(url, civitai_key="", hf_token="", is_upload_sf=False, half=True, vae=None,
|
@@ -279,7 +280,7 @@ def convert_url_to_diffusers_sdxl(url, civitai_key="", hf_token="", is_upload_sf
|
|
279 |
elif new_vae_file:
|
280 |
pipe.vae = AutoencoderKL.from_single_file(new_vae_file)
|
281 |
|
282 |
-
fuse_loras(pipe, lora_dict, temp_dir, civitai_key, hf_token)
|
283 |
|
284 |
sconf = get_scheduler_config(scheduler)
|
285 |
pipe.scheduler = sconf[0].from_config(pipe.scheduler.config, **sconf[1])
|
|
|
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()
|
244 |
+
return pipe
|
245 |
|
246 |
|
247 |
def convert_url_to_diffusers_sdxl(url, civitai_key="", hf_token="", is_upload_sf=False, half=True, vae=None,
|
|
|
280 |
elif new_vae_file:
|
281 |
pipe.vae = AutoencoderKL.from_single_file(new_vae_file)
|
282 |
|
283 |
+
pipe = fuse_loras(pipe, lora_dict, temp_dir, civitai_key, hf_token)
|
284 |
|
285 |
sconf = get_scheduler_config(scheduler)
|
286 |
pipe.scheduler = sconf[0].from_config(pipe.scheduler.config, **sconf[1])
|
local/convert_url_to_diffusers_sdxl.py
CHANGED
@@ -212,6 +212,7 @@ def fuse_loras(pipe, civitai_key="", lora_dict={}, temp_dir="."):
|
|
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()
|
|
|
215 |
|
216 |
|
217 |
def convert_url_to_diffusers_sdxl(url, civitai_key="", half=True, vae=None, scheduler="Euler a", lora_dict={}):
|
@@ -248,7 +249,7 @@ def convert_url_to_diffusers_sdxl(url, civitai_key="", half=True, vae=None, sche
|
|
248 |
elif new_vae_file:
|
249 |
pipe.vae = AutoencoderKL.from_single_file(new_vae_file)
|
250 |
|
251 |
-
fuse_loras(pipe, lora_dict, temp_dir, civitai_key)
|
252 |
|
253 |
sconf = get_scheduler_config(scheduler)
|
254 |
pipe.scheduler = sconf[0].from_config(pipe.scheduler.config, **sconf[1])
|
|
|
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()
|
215 |
+
return pipe
|
216 |
|
217 |
|
218 |
def convert_url_to_diffusers_sdxl(url, civitai_key="", half=True, vae=None, scheduler="Euler a", lora_dict={}):
|
|
|
249 |
elif new_vae_file:
|
250 |
pipe.vae = AutoencoderKL.from_single_file(new_vae_file)
|
251 |
|
252 |
+
pipe = fuse_loras(pipe, lora_dict, temp_dir, civitai_key)
|
253 |
|
254 |
sconf = get_scheduler_config(scheduler)
|
255 |
pipe.scheduler = sconf[0].from_config(pipe.scheduler.config, **sconf[1])
|