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.
Use PyTorch as the source of truth
PyTorch wheel combinations change faster than most ComfyUI guides. Use the PyTorch Start Locally tool as the final source of truth for your current Python, CUDA, ROCm, and platform combination. The commands below are the common combinations this page is designed around.
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 ComfyUIStep 2: Create a Virtual Environment (Recommended)
python -m venv venv
venv\Scripts\activateYou 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-smiThen choose the right PyTorch install command:
NVIDIA GPU — CUDA Version Matching
| Driver Version | CUDA Version | PyTorch Command |
|---|---|---|
| 560+ | CUDA 12.6 | python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126 |
| 570+ | CUDA 12.8 | python -m 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 | python -m 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:
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu126AMD GPU (Linux with ROCm)
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2.4CPU Only
python -m pip install torch torchvision torchaudioStep 4: Install Dependencies
Do not run pip install -r requirements.txt blindly.
- Confirm which Python environment is active (
where pythonorwhich python) - Inspect
requirements.txt— check if it pins torch, numpy, or opencv versions - Install only the missing package when possible:
pip install <package-name> - Run
pip checkafter installation to verify no conflicts were introduced
python -m pip install -r requirements.txtFaster alternative: uv
uv is a much faster Python package installer (written in Rust). If you install it, you can replace many python -m pip install commands with uv pip install for faster downloads:
python -m pip install uv
uv pip install -r requirements.txtStep 5: Download a Model
Place at least one checkpoint model in models/checkpoints/:
ComfyUI/
└── models/
└── checkpoints/ ← Put your .safetensors file hereSee Download Models for model recommendations.
Step 6: Run ComfyUI
python main.pyOnce 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 installThis handles cloning, virtual environment creation, PyTorch installation, and dependency setup in one command.
Updating
cd ComfyUI
git pullDo not run pip install -r requirements.txt blindly.
- Confirm which Python environment is active (
where pythonorwhich python) - Inspect
requirements.txt— check if it pins torch, numpy, or opencv versions - Install only the missing package when possible:
pip install <package-name> - Run
pip checkafter installation to verify no conflicts were introduced
If git pull fails, new features do not appear, or you need to downgrade to a known commit or stable tag, use ComfyUI Won't Update or Need to Downgrade before changing packages.
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 python -m pip install -r requirements.txt |
| Frontend package missing after update | See ComfyUI Frontend Package |
| 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 |
| ComfyUI uses the wrong GPU | Choose the device with ComfyUI Multi GPU |
Next Steps
- Generate your first image
- Download models
- Install custom nodes
- System requirements
- ComfyUI Won't Update
- ComfyUI Multi GPU
- Troubleshoot common issues
Source References
Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.
Download Wonderful LauncherDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.