Implement headless ComfyUI installation and improve backend status handling

- Added a new function to ensure headless installation of ComfyUI when backends are empty, enhancing the setup process for SwarmUI.
- Updated documentation to clarify the installation flow and backend readiness checks, ensuring users understand the requirements for a successful setup.
- Enhanced backend status checks to differentiate between 'empty' and 'idle' states, improving error handling and user feedback during provisioning.
- Adjusted logging messages to provide clearer insights into the installation and backend status processes.
This commit is contained in:
Leonid Pershin
2026-08-21 09:18:59 +03:00
parent 97abc7985e
commit f7ba915e74
9 changed files with 454 additions and 8 deletions
+14
View File
@@ -92,6 +92,20 @@ def tune_swarm_perf(cfg: Config, host: str, log: Log) -> bool:
return "RESTART_SWARMUI=1" in out
def ensure_swarm_comfy_installed(cfg: Config, host: str, log: Log) -> None:
"""Headless SwarmUI InstallConfirmWS (ComfyUI) when backends are still empty."""
log("SwarmUI first-install: ComfyUI backend (если ещё empty)…")
run_python(
cfg,
host,
_pkg_text("install_swarm_comfy.py"),
remote_path="/tmp/gpu-rent-install_swarm_comfy.py",
# Cold: git clone Comfy + pip torch — often 1540 min.
timeout=3900,
log=log,
)
def seed_extensions(cfg: Config, host: str, log: Log, *, update: bool = True) -> bool:
from gpu_rent.llm_runtime import normalize_runtime