How to Install ComfyUI on Windows
In this article
Yes, you can install ComfyUI on Windows—it's a user-friendly, node-based interface for running Stable Diffusion models locally, allowing you to generate images through visual workflows instead of command-line inputs. To get it working, you need a Windows PC with a compatible NVIDIA or AMD GPU, sufficient VRAM (ideally 6GB or more), and Python installed. The process involves downloading ComfyUI, setting up Python dependencies, and launching the application through a script. Below is the complete, verified guide to installing ComfyUI correctly and avoiding common issues.
What You'll Need
- A Windows 10 or Windows 11 PC (64-bit)
- An NVIDIA or AMD GPU with at least 6GB VRAM (8GB+ recommended for better performance)
- At least 10GB of free disk space (SSD recommended)
- Python 3.10 (must be exactly this version for compatibility)
- Git (to clone the ComfyUI repository)
- Internet connection (for downloading models and dependencies)
Step-by-Step
- Download and install Python 3.10 from the official Python website. During installation, check the box that says Add Python to PATH. This is critical—without it, the command-line tools won’t work. After installation, open Command Prompt and type
python --versionto confirm it returnsPython 3.10.x. - Download and install Git for Windows from the official Git website. Run the installer with default settings. After installation, open a new Command Prompt window and type
git --versionto verify it’s installed. - Choose a folder where you want to install ComfyUI—such as
C:\comfyui. Open Command Prompt as administrator, navigate to that folder usingcd C:\comfyui(replace with your path), and run the following command to clone the official ComfyUI repository:git clone https://github.com/comfyanonymous/ComfyUI.git .
The period at the end ensures it clones into the current directory. - Navigate into the ComfyUI directory:
cd ComfyUI - Install the required Python packages by running:
pip install -r requirements.txt
This installs PyTorch, torchvision, and other dependencies. If you have an NVIDIA GPU, this command automatically pulls the correct CUDA-compatible version of PyTorch. - Download a Stable Diffusion model to use with ComfyUI. Go to a trusted source like Hugging Face or Civitai and download a checkpoint file (e.g.,
sd_xl_base_1.0.safetensors). Place this file in themodels\checkpointsfolder inside your ComfyUI directory. If the folder doesn’t exist, create it manually. - Return to the Command Prompt in the ComfyUI directory and launch the application by running:
python main.py --listen 127.0.0.1 --port 8188
This starts the ComfyUI server and makes it accessible athttp://127.0.0.1:8188in your web browser. - Open your web browser and go to http://127.0.0.1:8188. You should see the ComfyUI interface—a blank canvas where you can start building workflows by loading models, prompts, and samplers.
- To make launching easier, create a batch file. In the ComfyUI folder, create a new text file named
run.bat, edit it with Notepad, and add the following lines:python main.py --listen 127.0.0.1 --port 8188pause
Save the file. Now, double-clickingrun.batwill launch ComfyUI without opening Command Prompt manually.
Common Mistakes
- Installing the wrong Python version—ComfyUI only works reliably with Python 3.10. Python 3.11 or 3.12 will cause dependency conflicts.
- Forgetting to add Python to PATH during installation, leading to “python is not recognized” errors.
- Using forward slashes (
/) instead of backslashes (\) in Windows file paths when writing commands. - Placing model files in the wrong folder—ensure checkpoint files go in
models/checkpoints, not the root orcustom_nodesfolder. - Running the launch command from the wrong directory—always run
python main.pyfrom inside the ComfyUI folder.
Tips
- Use an SSD for faster model loading and generation times.
- Keep your GPU drivers updated—especially for NVIDIA cards, as newer drivers improve CUDA performance.
- Bookmark your ComfyUI browser tab since you’ll use it frequently.
- Use the
--preview-method autoflag in the launch command if you want faster image previews. - Regularly update ComfyUI by running
git pullin the ComfyUI directory to get the latest features and fixes.
Troubleshooting
If ComfyUI fails to start, first check the Command Prompt output for error messages. Common issues include missing dependencies or incorrect Python versions. If you see “ModuleNotFoundError”, re-run pip install -r requirements.txt. If PyTorch fails to install with CUDA support, try installing it manually using the official PyTorch command for Windows with pip. If the browser shows a blank screen or connection refused, ensure the server is running and no firewall is blocking port 8188. Restart your PC and try launching again. If models don’t appear in the dropdown, double-check the file is in models/checkpoints and has a .safetensors or .ckpt extension. If you get CUDA out of memory errors, reduce the resolution or batch size in your workflow.
Frequently Asked Questions
Can I run ComfyUI without a GPU?
Yes, but it will be extremely slow. ComfyUI relies on GPU acceleration for reasonable performance. CPU-only mode is not recommended.
Do I need to install Stable Diffusion separately?
No—ComfyUI includes everything needed except the model file. You just need to download a compatible checkpoint and place it in the correct folder.
Is ComfyUI safe to use?
Yes, when downloaded from the official GitHub repository. Avoid third-party sites offering modified versions, as they may contain malware.
Can I use AMD GPUs with ComfyUI?
Yes, AMD GPUs are supported via ROCm or DirectML, though setup may require extra steps. NVIDIA GPUs offer the smoothest experience.
How do I update ComfyUI?
Open Command Prompt in the ComfyUI folder and run git pull. This fetches the latest updates from the official repository.
Where are my generated images saved?
Images are saved in the output folder inside your ComfyUI directory by default. You can change this in the workflow settings.