Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
app.py
CHANGED
@@ -160,7 +160,7 @@ def change_base_model(repo_id: str, cn_on: bool, disable_model_cache: bool, mode
|
|
160 |
global pipe, pipe_i2i, taef1, good_vae, controlnet_union, controlnet, last_model, last_cn_on, last_task, last_dtype_str, dtype
|
161 |
try:
|
162 |
if not disable_model_cache and (repo_id == last_model and cn_on is last_cn_on and task == last_task and dtype_str == last_dtype_str)\
|
163 |
-
or ((not is_repo_name(repo_id) or not is_repo_exists(repo_id)) and not ".safetensors" in repo_id and not ".gguf" in repo_id
|
164 |
unload_lora()
|
165 |
pipe.to("cpu")
|
166 |
pipe_i2i.to("cpu")
|
|
|
160 |
global pipe, pipe_i2i, taef1, good_vae, controlnet_union, controlnet, last_model, last_cn_on, last_task, last_dtype_str, dtype
|
161 |
try:
|
162 |
if not disable_model_cache and (repo_id == last_model and cn_on is last_cn_on and task == last_task and dtype_str == last_dtype_str)\
|
163 |
+
or ((not is_repo_name(repo_id) or not is_repo_exists(repo_id)) and not ".safetensors" in repo_id): return gr.update() # and not ".gguf" in repo_id
|
164 |
unload_lora()
|
165 |
pipe.to("cpu")
|
166 |
pipe_i2i.to("cpu")
|