Batch-driven installer, updater, and supervised launcher for ComfyUI on Windows 11 with NVIDIA GPUs (Ada sm_89 and Blackwell sm_120 tested). Still useful alongside ComfyUI Desktop when you want a plain git checkout, a real venv you control, and a self-healing foreground launcher.
| Component | Version / source |
|---|---|
| Python | 3.12 venv at %USERPROFILE%\ComfyUI\.venv (winget-installed if missing) |
| PyTorch | 2.13.0 from the cu130 wheel index (CUDA 13.0; cu132 fallback) + torchvision 0.28 / torchaudio 2.11 |
| ComfyUI | latest master, shallow clone/update |
| ComfyUI-Manager | pip package via ComfyUI's manager_requirements.txt (enable with --enable-manager) |
| onnxruntime-gpu | stable PyPI (1.27+, CUDA 13 build) — CPU build as fallback |
| SageAttention | 2.2.0 prebuilt Windows wheel (cu130, torch ≥ 2.10, abi3) + triton-windows < 3.8 |
| bitsandbytes | latest (Windows CUDA 13 wheels, sm75–sm120) |
| cupy | cupy-cuda13x==13.6.0 (the CUDA 13 build that keeps numpy < 2 compatibility) |
| Custom nodes | rgthree-comfy, comfyui_controlnet_aux, ComfyUI-Advanced-ControlNet, ComfyUI_ExtraModels, ComfyUI-GGUF (git, latest) |
numpy is held at 1.x because mediapipe (pulled in by controlnet_aux) still pins numpy<2.
- Copy
.env.exampleto.envand edit paths/flags as needed (all optional). - Run
install_update_comfyui.bat— safe to re-run any time to update everything. - Run
launch_comfyui.batto start ComfyUI in the foreground.
The launcher runs comfyui_windows.py, a supervisor that:
- writes per-session logs to
logs/(7-day retention), - detects readiness from the server log, restarts on crash with exponential backoff,
- gives up (exit code 1) after 10 rapid failures instead of looping forever,
- frees the server port from stale ComfyUI/python processes only (never kills unrelated apps),
- generates
extra_model_paths.yamlfromMODEL_BASE_PATH— and leaves it alone if you hand-edit it (remove the generated-by marker line).
COMFYUI_DIR=C:\Users\YOU\ComfyUI # install/launch target (honored by both scripts)
MODEL_BASE_PATH=Z:\comfy\models # models on another drive/NAS
SERVER_PORT=8188
CUSTOM_PARAMETERS=--listen --enable-manager --use-sage-attention --preview-method auto
See .env.example for the full list.
- CUDA 12.x is no longer targeted: torch cu128 is frozen at 2.11, and onnxruntime-gpu ≥ 1.27 dropped CUDA 12. The whole stack is CUDA 13.
- SageAttention wheel courtesy of woct0rdho/SageAttention; source build + 1.0.6 remain as fallbacks (VS Build Tools required for source builds).
