ComfyUI Installation Guide
In this section, weβll go through several ways to install ComfyUI. All methods ultimately give you the same result, so you can simply choose the one that best matches your operating system and experience level.
Method 1: Download from the Official Website (Desktop Version)
Steps
- Visit the official ComfyUI website: https://comfy.org/
- Click the Download button and select the version for your operating system (Windows, macOS, or Linux).
- Open the downloaded file and start the installation process.
During installation, the program will automatically download the required files and set up ComfyUI on your computer.
Important Notes
- Windows users: ComfyUI works best with NVIDIA GPUs because most AI models rely on CUDA acceleration.
- Automatic dependency installation: The installer will attempt to download and configure required dependencies automatically. However, in some environments you may still encounter missing packages or version conflicts.
Method 2: Download the Portable Version
Another easy way to run ComfyUI is to use the portable version. This version does not require a traditional installation.
Steps
- Download the portable package from a trusted source.
- Extract the archive to any folder on your computer.
- Open the extracted folder.
- Run the startup script (for example
run_nvidia_gpu.baton Windows).
The portable version already includes most required components, so it is often the quickest way to get started.
Method 3: Clone from the GitHub Repository (Recommended for Developers)
If you prefer more control over your environment, you can install ComfyUI directly from the source repository.
Steps
- Make sure Git and Python are installed on your system. Recommended Python versions: 3.10 β 3.11.
- Open a Terminal (Linux/macOS) or Command Prompt / PowerShell (Windows).
- Run the following commands:
# Clone the repository
git clone https://github.com/comfyanonymous/ComfyUI.git
# Enter the project directory
cd ComfyUI
# Install required dependencies
pip install -r requirements.txt
This method works on Windows, macOS, and Linux.
Method 4: Windows Launcher (Beginner-Friendly)
Some third-party launchers provide a graphical interface that simplifies installation and environment configuration. These tools can automatically install Python, CUDA, and other dependencies.
Steps
- Visit the download page: https://pan.quark.cn/s/64b808baa960
- Download one of the packages (for example
ComfyUI-aki-v2.7zorComfyUI-aki-v3.7z). - Extract the archive to a folder on your computer.
- Run the launcher executable file.
- The launcher will detect your system environment and help install any missing components automatically.
This method is particularly convenient for users who prefer not to use the command line.
Method 5: Use a Cloud Platform
If your computer does not have a powerful GPU, you can also run ComfyUI on cloud platforms.
Some services provide ready-to-use environments, including:
- runninghub.com
- cloud.comfy.org
- liblib.ai(for chinese user)
Cloud platforms usually provide GPU resources, but they often come with usage limits or credit systems, so long-term use may require payment.
Method 6: use cnb platform
Running ComfyUI on CNB by Forking the Repository
This guide explains how to run ComfyUI directly on CNB by forking the repository and launching it in the cloud development environment. This approach requires no local installation and allows you to run ComfyUI entirely in a cloud workspace.
1. What is CNB
Cloud Native Buildpacks (CNB) is a cloud development environment platform that allows developers to:
- Fork Git repositories
- Automatically build environments
- Run applications directly in the browser
- Deploy applications without manual environment setup
CNB workspaces usually provide:
- Linux development environment
- Preinstalled development tools
- Public access URLs
- Persistent storage
This makes it convenient for running AI tools such as ComfyUI.
2. Prerequisites
Before starting, prepare the following:
1. CNB Account
Create an account on the CNB platform.
2. GitHub Account
You will need GitHub to fork the repository.
3. Basic Knowledge
Basic familiarity with:
- Linux terminal
- Git
- Python
3. Fork the ComfyUI Repository
Go to the official repository:
https://github.com/comfyanonymous/ComfyUI
Click Fork.
This creates your own copy of the repository in your GitHub account.
Example:
https://github.com/YOURNAME/ComfyUI
4. Import the Forked Repository into CNB
Open the CNB dashboard.
Steps:
- Click New Workspace
- Choose Import from Git Repository
- Paste your forked repository URL
Example:
https://github.com/YOURNAME/ComfyUI
- Select environment configuration.
Recommended environment:
OS: Ubuntu
Python: 3.10
CPU: 4 cores
RAM: 16GB
Then click Create Workspace.
CNB will automatically:
Clone repository
Create development environment
Start workspace
5. Open the CNB Terminal
Once the workspace is created, open the terminal inside CNB.
Navigate to the project directory:
cd ComfyUI
Verify files:
ls
Expected output:
main.py
requirements.txt
models
nodes
6. Install Dependencies
Install Python dependencies:
pip install -r requirements.txt
If using PyTorch:
pip install torch torchvision torchaudio
Installation may take several minutes.
7. Download Models
Create model directories:
mkdir -p models/checkpoints
mkdir -p models/vae
mkdir -p models/loras
mkdir -p models/controlnet
Upload or download Stable Diffusion models.
Example structure:
models
β checkpoints
β β sd_xl_base.safetensors
β vae
β loras
β controlnet
8. Start ComfyUI
Run the server:
python main.py --listen --port 8188
You should see logs like:
Starting ComfyUI server
Listening on port 8188
9. Access the ComfyUI Interface
CNB typically provides public ports.
Open:
http://workspace-url:8188
Example:
https://workspace-abc123.cnb.dev:8188
You will see the ComfyUI visual workflow editor.
10. Running ComfyUI in the Background
To keep ComfyUI running after closing the terminal:
Install screen:
sudo apt install screen
Start screen session:
screen -S comfyui
Run ComfyUI:
python main.py --listen --port 8188
Detach session:
CTRL + A + D
11. Updating ComfyUI
Pull latest updates:
git pull
Reinstall dependencies if necessary:
pip install -r requirements.txt
Restart the server.
12. Troubleshooting
Port Cannot Be Accessed
Check if ComfyUI is running:
ps aux | grep python
Make sure port 8188 is exposed by CNB.
Python Version Error
Check Python version:
python --version
Recommended:
Python 3.10+
Out of Memory
ComfyUI may require large memory for models.
Possible solutions:
- Use smaller models
- Increase workspace RAM
- Enable swap memory
13. Recommended Workflow
Typical workflow on CNB:
Fork repository
β
Import repository into CNB workspace
β
Install dependencies
β
Upload models
β
Run ComfyUI
β
Access via public URL
14. Advantages of Running ComfyUI on CNB
Advantages include:
- No local GPU required
- Cloud-based development
- Easy sharing
- Fast setup
- Persistent workspace
This is especially useful for:
- AI experimentation
- teaching environments
- collaborative workflows
Note: Choose whichever installation method you find most comfortable. If you encounter problems during installation, you can check the troubleshooting section later in this guide or search for solutions online.