Welcome to our comprehensive guide on installing ComfyUI, a powerful, node-based interface for generative AI that is quickly becoming the go-to tool for creators. In this tutorial, we provide clear, step-by-step instructions for installing ComfyUI on multiple platforms, ensuring that whether you're a beginner or an advanced user, you can get up and running with ease.
Overview
ComfyUI offers a unique approach to creative control in image and video generation by using interconnected nodes. It is actively developed and remains the most flexible way to run current image and video models locally. In this guide, we cover three primary methods for installing ComfyUI:
- Installation via Stability Matrix: An automated solution for hassle-free setup.
- Installation via the Pre-Compiled Package: A quick and straightforward option for Windows users with NVIDIA GPUs.
- Manual Installation: For those who desire complete control over their installation process.
Each method is designed to cater to different user needs while ensuring optimal performance and compatibility.
Installation Methods
1. Installation via Stability Matrix
Stability Matrix streamlines the installation process by automatically handling dependencies such as Git, Python, and necessary frameworks. This method is ideal for users on Windows, Mac, or Linux who prefer a simple, guided installation.
Key Steps:
- Download Stability Matrix: Get the latest version from the official website or GitHub.
- Extract and Launch: Unzip the archive into your chosen directory and launch the application.
- Select ComfyUI: From the welcome screen, choose ComfyUI to start the installation.
- Download Models: Optionally, select additional Stable Diffusion models during the process.
2. Installation via the Pre-Compiled Package (Recommended for Windows)
For Windows users, the pre-compiled package is a “plug and play” solution that bundles all required components, making installation a breeze—provided you have an NVIDIA GPU.
System Requirements:
- GPU: At least 8GB VRAM (NVIDIA RTX3060 or higher recommended)
- CPU: Intel Core i5 or AMD Ryzen 5 (or better)
- RAM: 8-16 GB
- Storage: SSD with at least 40GB of free space
Installation Steps:
- Download the Package: Retrieve the latest version from GitHub.
- Extract Files: Unzip the downloaded archive into your installation directory.
-
Launch ComfyUI: Execute the
run_nvidia_gpu.batfile. The web interface will automatically open at http://localhost:8188.
3. Manual Installation
For those who prefer a more tailored setup, manual installation allows for complete customization. This method is ideal for advanced users or anyone who wants to gain a deeper understanding of the system.
For Windows:
-
Install Python & Dependencies:
- Download Python (version 3.10 or later) and Git.
- Install the necessary libraries.
-
Set Up Miniconda:
- Use Miniconda to create and manage your Python environment.
-
Install PyTorch:
- Use Conda to install PyTorch with CUDA support for NVIDIA GPUs.
-
Clone the Repository:
- Run
git clone https://github.com/comfyanonymous/ComfyUI.gitin your terminal.
- Run
-
Finalize Installation:
- Navigate to the
ComfyUIfolder and runpip install -r requirements.txt. - Launch ComfyUI using
python main.py.
- Navigate to the
For Mac (Apple Silicon):
-
Install Homebrew & Dependencies:
- Install Homebrew and use it to install Python, Git, and other essential tools.
-
Set Up Miniconda:
- Create and activate your environment in the Terminal.
-
Install PyTorch:
- Use the nightly build command for PyTorch compatibility with Apple Silicon.
-
Clone and Install:
- Clone the repository and install dependencies as with the Windows method.
-
Launch ComfyUI:
- Run the application from the Terminal using
python main.py.
- Run the application from the Terminal using
Managing Models and Extensions
ComfyUI’s effectiveness is amplified by its support for various models and extensions. Here's how to manage them:
-
Directory Structure:
-
/checkpointsfor main models (e.g., Stable Diffusion, SDXL, Flux) -
/vaefor variational autoencoders -
/controlnetfor ControlNet models - Additional folders for LoRA, CLIP, and upscaling models.
-
-
Installing Models:
- Download models in the
.safetensorformat from reliable sources. - Place them in the appropriate folder and restart ComfyUI to load the new models.
- Download models in the
-
Special Configurations:
- For complex models like Flux, ensure you also install specific CLIP encoders and configure the corresponding VAE.
Conclusion
ComfyUI represents a significant leap forward in the field of generative AI, offering unmatched flexibility and control for creative projects. Whether you choose the ease of Stability Matrix, the simplicity of the pre-compiled package, or the customization of manual installation, this guide aims to provide you with the tools you need to harness the full potential of ComfyUI.
Fixing Common Installation Errors
torch.cuda.is_available() returns False — the most common manual-install failure. It
means PyTorch was installed as the CPU build. Uninstall torch, torchvision and
torchaudio, then reinstall from the CUDA-specific index URL for your CUDA version rather
than with a plain pip install torch.
ModuleNotFoundError after installing a custom node — custom nodes carry their own
dependencies that are not covered by ComfyUI's requirements.txt. Install the node's own
requirements.txt, and do it inside the same environment ComfyUI runs in. Mixing a Conda
environment with the portable build's bundled Python is the usual cause.
CUDA out of memory — launch with --lowvram, or --novram on very constrained cards.
Reducing batch size and output resolution matters more than any launch flag; Flux models in
particular need considerably more headroom than SDXL.
The web interface never opens — ComfyUI serves on http://localhost:8188. If the port is
already taken the server logs an error and exits; start it with --port 8189 to test.
Models do not appear in the node dropdowns — files must be in the correct subfolder and
in a supported format, and ComfyUI reads the folder list at startup. Restart after adding
files, or use the Refresh option in the interface.
Mac: extremely slow generation — confirm PyTorch is using the MPS backend. Falling back
to CPU on Apple Silicon produces a working but dramatically slower install.
Install ComfyUI Manager First
Whichever installation route you take, install ComfyUI Manager before anything else. It
handles installing, updating and disabling custom nodes from inside the interface, and it
resolves missing nodes when you load someone else's workflow — which otherwise means reading
the JSON to work out what is absent. Nearly every workflow you download will expect it.
Which Method Should You Choose?
| Method | Best for | Trade-off |
|---|---|---|
| Stability Matrix | First-time users on any OS | Less direct control over the environment |
| Portable package | Windows with an NVIDIA GPU | Windows and NVIDIA only |
| Manual install | Custom setups, Mac, Linux, development | You manage Python and CUDA yourself |
If you are not sure, use Stability Matrix on Mac and Linux and the portable package on
Windows. Manual installation is worth it once you need a specific PyTorch version or intend
to modify ComfyUI itself.
FAQ
How much VRAM do I actually need?
8GB is a realistic floor for SDXL at sensible resolutions. Flux and current video models
want considerably more. Below 8GB, --lowvram will get you running, more slowly.
Does ComfyUI work on AMD GPUs?
On Linux, yes, through ROCm builds of PyTorch. On Windows, support is via DirectML and is
noticeably less mature than the NVIDIA path.
Can ComfyUI and Automatic1111 share the same models folder?
Yes, and it is worth doing — model files are large. ComfyUI reads a config file that lets
you point its model paths at an existing installation instead of duplicating checkpoints.
Why do downloaded workflows show red nodes?
Red nodes are custom nodes you do not have installed. Open ComfyUI Manager and use its
install-missing-nodes option, then restart.
Is the portable build safe to move between machines?
Yes — it bundles its own Python, so copying the folder generally works, provided the target
machine has a compatible NVIDIA driver.
Last reviewed and updated: July 2026.


Top comments (0)