John6666 commited on
Commit
8d1363a
·
verified ·
1 Parent(s): 85454c3

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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): return gr.update()
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")