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
+13 -1
View File
@@ -21,7 +21,12 @@ from gpu_rent.cloud import (
wait_volume,
)
from gpu_rent.bootstrap import run_bootstrap
from gpu_rent.provision import provision_vm, seed_swarmui_api_keys, tune_swarm_perf
from gpu_rent.provision import (
ensure_swarm_comfy_installed,
provision_vm,
seed_swarmui_api_keys,
tune_swarm_perf,
)
from gpu_rent.ready import verify_gpu_env, verify_stack_on_vm, wait_backend_idle
from gpu_rent.snapshot import ensure_boot_snapshot
from gpu_rent.notify import notify_ready
@@ -152,10 +157,17 @@ def _bind_access(
)
clock.mark("provision", log)
if swarm:
try:
ensure_swarm_comfy_installed(cfg, ip, log)
except Exception as exc:
log(f"SwarmUI Comfy install: {exc}")
raise
clock.mark("comfy-install", log)
try:
wait_backend_idle(cfg, ip, log)
except CloudError as exc:
log(f"ready: {exc}")
raise
clock.mark("Idle", log)
try:
if tune_swarm_perf(cfg, ip, log):