installation
Manual Install
Install ComfyUI manually from source for full control.
Manual installation gives you full control over your Python environment, PyTorch version, and CUDA configuration. This method is recommended for developers and advanced users.
Prerequisites
Install these before starting:
- Python 3.12 or 3.13 (3.13 recommended) — Download from python.org
- During install, check "Add Python to PATH"
- Git — Download from git-scm.com
- NVIDIA GPU drivers — Download from nvidia.com
Step 1: Clone the Repository
Open Command Prompt or PowerShell:
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
Step 2: Create a Virtual Environment (Recommended)
python -m venv venv
venv\Scripts\activate
You should see (venv) at the start of your command prompt.
Step 3: Install PyTorch
Install PyTorch with the CUDA version that matches your NVIDIA driver. First, check your driver version:
nvidia-smi
Then choose the right PyTorch install command:
NVIDIA GPU — CUDA Version Matching
| Driver Version | CUDA Version | PyTorch Command |
|---|---|---|
| 560+ | CUDA 12.6 | pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126 |
| 570+ | CUDA 12.8 | pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128 |
| 575+ | CUDA 13.0 | pip install torch==2.9.1 torchvision==0.24.1 torchaudio==2.9.1 --index-url https://download.pytorch.org/whl/cu130 |
RTX 50 Series Users
RTX 5070 Ti / 5080 / 5090 require CUDA 12.8 or higher. Make sure your driver is version 570+, and use the CUDA 12.8 or 13.0 PyTorch build. See GPU Compatibility for the full driver-CUDA-PyTorch matrix.
If you're unsure, the CUDA 12.6 build works for most RTX 20/30/40 series cards:
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126
AMD GPU (Linux with ROCm)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2.4
CPU Only
pip install torch torchvision torchaudio
Step 4: Install Dependencies
pip install -r requirements.txt
Faster alternative: uv
uv is a much faster Python package installer (written in Rust). If you install it, you can replace any
pip installcommand withuv pip installfor 10-100x faster downloads:pip install uv uv pip install -r requirements.txt
Step 5: Download a Model
Place at least one checkpoint model in models/checkpoints/:
ComfyUI/
└── models/
└── checkpoints/ ← Put your .safetensors file here
See Download Models for model recommendations.
Step 6: Run ComfyUI
python main.py
Once you see Starting server, open http://127.0.0.1:8188 in your browser.
Using comfy-cli (Alternative)
comfy-cli is a command-line tool that automates the manual install process:
pip install comfy-cli
comfy install
This handles cloning, virtual environment creation, PyTorch installation, and dependency setup in one command.
Updating
cd ComfyUI
git pull
pip install -r requirements.txt
Troubleshooting
| Problem | Solution |
|---|---|
python command not found |
Reinstall Python with "Add to PATH" checked, or use python3 |
CUDA not available after PyTorch install |
PyTorch CUDA version doesn't match your driver. Check with nvidia-smi and reinstall the matching PyTorch |
ModuleNotFoundError |
Make sure your venv is activated and run pip install -r requirements.txt |
| Build errors during pip install | Install Visual Studio Build Tools — some packages need a C++ compiler |
torch.cuda.OutOfMemoryError |
Run with python main.py --lowvram |
Wonderful Launcher Docs