Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,6 @@ _nodes_ready = False
|
|
| 73 |
tasks_status = {}
|
| 74 |
_last_used_architecture = None
|
| 75 |
_last_used_unet = None
|
| 76 |
-
_has_had_first_run = False
|
| 77 |
|
| 78 |
# ==========================================================================
|
| 79 |
# ⚙️ Comfy Config
|
|
@@ -929,15 +928,8 @@ def background_generate_task(task_id: str, req: GenerateRequest, ip_token: str =
|
|
| 929 |
if need_heavy_load:
|
| 930 |
with _model_switch_lock:
|
| 931 |
if _last_used_architecture != current_arch:
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
if not _has_had_first_run:
|
| 935 |
-
with _status_lock:
|
| 936 |
-
tasks_status[task_id]["message"] = "🎲 You are the lucky one to trigger the first cold start after restart! Waking up the GPU and loading tensors will take about 30s. Subsequent generations and model switches will be faster."
|
| 937 |
-
_has_had_first_run = True
|
| 938 |
-
else:
|
| 939 |
-
with _status_lock:
|
| 940 |
-
tasks_status[task_id]["message"] = f"📦 Loading Base Model: {current_arch.upper()}..."
|
| 941 |
_last_used_architecture = current_arch
|
| 942 |
_last_used_unet = req.unet_choice
|
| 943 |
elif _last_used_unet != req.unet_choice:
|
|
|
|
| 73 |
tasks_status = {}
|
| 74 |
_last_used_architecture = None
|
| 75 |
_last_used_unet = None
|
|
|
|
| 76 |
|
| 77 |
# ==========================================================================
|
| 78 |
# ⚙️ Comfy Config
|
|
|
|
| 928 |
if need_heavy_load:
|
| 929 |
with _model_switch_lock:
|
| 930 |
if _last_used_architecture != current_arch:
|
| 931 |
+
with _status_lock:
|
| 932 |
+
tasks_status[task_id]["message"] = f"📦 Loading Base Model: {current_arch.upper()}..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 933 |
_last_used_architecture = current_arch
|
| 934 |
_last_used_unet = req.unet_choice
|
| 935 |
elif _last_used_unet != req.unet_choice:
|