Enhance installation state management and diagnostics for ComfyUI

- Updated the `gpu-rent` logic to ensure the `IsInstalled` flag is accurately set based on the presence of ComfyUI, preventing conflicts during installation.
- Improved the handling of the `/mnt/swarm_data` directory to skip creation if it does not exist, enhancing robustness in provisioning.
- Added tests to validate the new installation state checks and ensure proper diagnostics during the installation process, including scenarios for clearing and setting the `IsInstalled` flag.
This commit is contained in:
Leonid Pershin
2026-08-21 12:48:44 +03:00
parent f8ce9d1981
commit 1d18ece17b
4 changed files with 72 additions and 1 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
Первый запуск качает backend в `/opt/swarmui/dlbackend` (это bind на data volume). Иначе каждый recreate потеряет часы.
**gpu-rent:** после `systemctl start swarmui` вызывается headless `InstallConfirmWS` (`backend=comfyui`, `models=none`), если `GetCurrentStatus` ещё `empty`. Без этого UI отвечает HTTP 200, а Comfy/torch так и не появляются — раньше `wait_backend_idle` ошибочно считал `empty` = Idle.
**gpu-rent:** после `systemctl start swarmui` вызывается headless `InstallConfirmWS` (`backend=comfyui`, `models=none`), если `GetCurrentStatus` ещё `empty`. `IsInstalled: true` пишется только когда Comfy уже на диске; на первом старте (или если прошлый `up` оставил флаг без `dlbackend/ComfyUI`) флаг сбрасывается — иначе Swarm отвечает `Server is already installed!` и не клонирует Comfy. Без этого UI отвечает HTTP 200, а Comfy/torch так и не появляются — раньше `wait_backend_idle` ошибочно считал `empty` = Idle.
**Скорость без потери качества (gpu-rent):** после Idle backend, на GPU с compute capability ≥ 8.0 и ≥16GiB VRAM — SageAttention. `Performance.AllowGpuSpecificOptimizations` у Swarm по умолчанию уже включает `--fast` для 30xx+. Если venv ещё не появился — маркер без `pip_ok`, догонит на следующем `up`.