Upload app.py
Browse files
app.py
CHANGED
@@ -55,7 +55,7 @@ def change_base_model(repo_id: str, cn_on: bool): # , progress=gr.Progress(track
|
|
55 |
global last_model
|
56 |
global last_cn_on
|
57 |
try:
|
58 |
-
if (repo_id == last_model and cn_on is last_cn_on) or not is_repo_name(repo_id) or not is_repo_exists(repo_id):
|
59 |
if cn_on:
|
60 |
#progress(0, desc=f"Loading model: {repo_id} / Loading ControlNet: {controlnet_model_union_repo}")
|
61 |
print(f"Loading model: {repo_id} / Loading ControlNet: {controlnet_model_union_repo}")
|
@@ -81,7 +81,7 @@ def change_base_model(repo_id: str, cn_on: bool): # , progress=gr.Progress(track
|
|
81 |
except Exception as e:
|
82 |
print(f"Model load Error: {e}")
|
83 |
raise gr.Error(f"Model load Error: {e}")
|
84 |
-
|
85 |
|
86 |
change_base_model.zerogpu = True
|
87 |
|
|
|
55 |
global last_model
|
56 |
global last_cn_on
|
57 |
try:
|
58 |
+
if (repo_id == last_model and cn_on is last_cn_on) or not is_repo_name(repo_id) or not is_repo_exists(repo_id): yield gr.update(visible=True)
|
59 |
if cn_on:
|
60 |
#progress(0, desc=f"Loading model: {repo_id} / Loading ControlNet: {controlnet_model_union_repo}")
|
61 |
print(f"Loading model: {repo_id} / Loading ControlNet: {controlnet_model_union_repo}")
|
|
|
81 |
except Exception as e:
|
82 |
print(f"Model load Error: {e}")
|
83 |
raise gr.Error(f"Model load Error: {e}")
|
84 |
+
yield gr.update(visible=True)
|
85 |
|
86 |
change_base_model.zerogpu = True
|
87 |
|