ComfyUI/README.md
Brian Blankenship af845c908d
chore: fixed a heading level
- Added venv activation instructions for windows users alongside POSIX instructions
2026-02-25 13:17:26 -06:00

24 KiB

ComfyUI

The most powerful and modular visual AI engine and application.

Website Dynamic JSON Badge Twitter Matrix

ComfyUI Screenshot

ComfyUI lets you design and execute advanced stable diffusion pipelines using a graph/nodes/flowchart based interface. Available on Windows, Linux, and macOS.

Get Started

Option Description Platforms
Desktop Application Easiest way to get started Windows, macOS
Windows Portable Package Latest commits, no install required Windows
Manual Install Full control, all GPU types (NVIDIA, AMD, Intel, Apple Silicon, Ascend) Windows, Linux, macOS

Examples

See what ComfyUI can do with the example workflows.

Features

More examples: Examples page

Release Process

ComfyUI follows a weekly release cycle targeting Monday, though this may shift around model releases or large codebase changes. There are three interconnected repositories:

  1. ComfyUI Core

    • Releases a new stable version (e.g., v0.7.0) roughly every week.
    • From v0.4.0 onward, patch versions are used for fixes backported to the current stable release.
    • Minor versions are used for releases off the master branch.
    • Patch versions may also be used for master branch releases where a backport wouldn't make sense.
    • Commits outside stable release tags may be very unstable and break custom nodes.
    • Serves as the foundation for the desktop release.
  2. ComfyUI Desktop

    • Builds a new release using the latest stable core version.
  3. ComfyUI Frontend

    • Weekly frontend updates are merged into the core repository.
    • Features are frozen for the upcoming core release.
    • Development continues for the next release cycle.

Shortcuts

Keybind Action
Ctrl + Enter Queue current graph for generation
Ctrl + Shift + Enter Queue current graph as next in line
Ctrl + Alt + Enter Cancel current generation
Ctrl + Z / Ctrl + Y Undo / Redo
Ctrl + S Save workflow
Ctrl + O Load workflow
Ctrl + A Select all nodes
Alt + C Collapse / uncollapse selected nodes
Ctrl + M Mute / unmute selected nodes
Ctrl + B Bypass selected nodes (acts as if the node was removed and wires reconnected through)
Delete / Backspace Delete selected nodes
Ctrl + Backspace Delete the current graph
Space (hold) Pan the canvas
Ctrl / Shift + Click Add node to selection
Ctrl + C / Ctrl + V Copy / paste selected nodes (without preserving connections from unselected outputs)
Ctrl + C / Ctrl + Shift + V Copy / paste selected nodes (preserving connections from unselected outputs)
Shift + Drag Move multiple selected nodes
Ctrl + D Load default graph
Alt + + Zoom in
Alt + - Zoom out
Ctrl + Shift + LMB + vertical drag Zoom in / out
P Pin / unpin selected nodes
Ctrl + G Group selected nodes
Q Toggle queue visibility
H Toggle history visibility
R Refresh graph
F Show / hide menu
. Fit view to selection (or whole graph if nothing selected)
Double-click LMB Open node quick search
Shift + Drag (wire) Move multiple wires at once
Ctrl + Alt + LMB Disconnect all wires from clicked slot

Ctrl can be replaced with Cmd on macOS.

Installing

Windows Portable

There is a portable standalone build for Windows that should work for running on Nvidia GPUs or for running on your CPU only on the releases page.

Simply download, extract with 7-Zip or with the windows explorer on recent windows versions and run. For smaller models you normally only need to put the checkpoints (the huge ckpt/safetensors files) in: ComfyUI\models\checkpoints but many of the larger models have multiple files. Make sure to follow the instructions to know which subfolder to put them in ComfyUI\models\

If you have trouble extracting it, right click the file -> properties -> unblock

The portable above currently comes with python 3.13 and pytorch cuda 13.0. Update your Nvidia drivers if it doesn't start.

Alternative Downloads

How do I share models between another UI and ComfyUI?

See the Config file to set the search paths for models. In the standalone windows build you can find this file in the ComfyUI directory. Rename this file to extra_model_paths.yaml and edit it with your favorite text editor.

comfy-cli

You can install and start ComfyUI using comfy-cli:

python -m venv venv
# Linux/macOS
source venv/bin/activate
# Windows (PowerShell)
venv\Scripts\Activate.ps1
# Windows (CMD)
venv\Scripts\activate.bat
pip install comfy-cli
comfy install

# When no longer using comfy or the CLI,
# run 'deactivate' to close the venv.
# It is better to dedicate a terminal window
# just for Comfy, particularly if you are
# unfamiliar with Python.

Manual Install (Windows, Linux)

Python 3.14 works but some custom nodes may have issues. The free threaded variant works but some dependencies will enable the GIL so it's not fully supported.

Python 3.13 is very well supported. If you have trouble with some custom node dependencies on 3.13 you can try 3.12

torch 2.4 and above is supported but some features and optimizations might only work on newer versions. We generally recommend using the latest major version of pytorch with the latest cuda version unless it is less than 2 weeks old.

Instructions

Open a terminal inside the ComfyUI folder and run:

python -m venv venv
# Linux/macOS
source venv/bin/activate
# Windows (PowerShell)
venv\Scripts\Activate.ps1
# Windows (CMD)
venv\Scripts\activate.bat
pip install -r requirements.txt

Alternate PyTorch versions

To use a different PyTorch build, first uninstall the version that was automatically installed:

pip uninstall torch torchvision torchaudio
AMD GPUs (Linux)

Stable ROCm 7.2:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm7.2

ROCm 7.2 nightly (may have performance improvements):

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/rocm7.2
AMD GPUs — Experimental (Windows and Linux): RDNA 3, 3.5, and 4 only

These builds have narrower hardware support than the ROCm builds above but work on Windows. Install the PyTorch build matching your GPU architecture:

RDNA 3 (RX 7000 series):

pip install --pre torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/v2/gfx110X-all/

RDNA 3.5 (Strix Halo / Ryzen AI Max+ 365):

pip install --pre torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/v2/gfx1151/

RDNA 4 (RX 9000 series):

pip install --pre torch torchvision torchaudio --index-url https://rocm.nightlies.amd.com/v2/gfx120X-all/
Intel GPUs (Windows and Linux)

Intel Arc GPU users can install native PyTorch with torch.xpu support. More information: Accelerated PyTorch on XPU.

Stable:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu

Nightly (may have performance improvements):

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/xpu
NVIDIA

Stable:

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130

Nightly (may have performance improvements):

pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130
CPU only
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

Troubleshooting

If you get the "Torch not compiled with CUDA enabled" error, uninstall torch with:

pip uninstall torch

And install it again with the command above.

Other Platforms

Apple Mac Silicon

You can install ComfyUI on Apple Silicon (M1 or later) with any recent macOS version.

  1. Install PyTorch nightly by following the Accelerated PyTorch training on Mac Apple Developer guide (make sure to install the latest PyTorch nightly).
  2. Follow the ComfyUI manual installation instructions.
  3. Install the ComfyUI dependencies. If you have another Stable Diffusion UI you might be able to reuse the dependencies.
  4. Launch ComfyUI: python main.py

Note: Remember to add your models, VAE, LoRAs etc. to the corresponding Comfy folders, as discussed in ComfyUI manual installation.

Ascend NPUs

For models compatible with Ascend Extension for PyTorch (torch_npu). To get started, ensure your environment meets the prerequisites outlined on the installation page. Here's a step-by-step guide tailored to your platform and installation method:

  1. Begin by installing the recommended or newer kernel version for Linux as specified in the Installation page of torch-npu, if necessary.
  2. Proceed with the installation of Ascend Basekit, which includes the driver, firmware, and CANN, following the instructions provided for your specific platform.
  3. Next, install the necessary packages for torch-npu by adhering to the platform-specific instructions on the Installation page.
  4. Finally, adhere to the ComfyUI manual installation guide for Linux. Once all components are installed, you can run ComfyUI as described earlier.

Cambricon MLUs

For models compatible with Cambricon Extension for PyTorch (torch_mlu). Here's a step-by-step guide tailored to your platform and installation method:

  1. Install the Cambricon CNToolkit by adhering to the platform-specific instructions on the Installation
  2. Next, install the PyTorch(torch_mlu) following the instructions on the Installation
  3. Launch ComfyUI by running python main.py

Iluvatar Corex

For models compatible with Iluvatar Extension for PyTorch. Here's a step-by-step guide tailored to your platform and installation method:

  1. Install the Iluvatar Corex Toolkit by adhering to the platform-specific instructions on the Installation
  2. Launch ComfyUI by running python main.py

ComfyUI-Manager

ComfyUI-Manager is an extension that allows you to easily install, update, and manage custom nodes for ComfyUI.

Setup

  1. Install the manager dependencies:

    pip install -r manager_requirements.txt
    
  2. Enable the manager with the --enable-manager flag when running ComfyUI:

    python main.py --enable-manager
    

Command Line Options

Flag Description
--enable-manager Enable ComfyUI-Manager
--enable-manager-legacy-ui Use the legacy manager UI instead of the new UI (requires --enable-manager)
--disable-manager-ui Disable the manager UI and endpoints while keeping background features like security checks and scheduled installation completion (requires --enable-manager)

Place your models

Type Directory
Checkpoints (.ckpt / .safetensors) models/checkpoints
VAE models/vae

Running

python main.py

AMD cards not officially supported by ROCm

If you have issues, try setting the HSA_OVERRIDE_GFX_VERSION environment variable:

  • RX 6700, 6600, and other RDNA2 or older:
    HSA_OVERRIDE_GFX_VERSION=10.3.0 python main.py
    
  • RX 7600 and other RDNA3:
    HSA_OVERRIDE_GFX_VERSION=11.0.0 python main.py
    

AMD ROCm tips

You can enable experimental memory-efficient attention on recent PyTorch for some AMD GPUs. It should already be enabled by default on RDNA3. If this improves speed on your GPU, please report it so it can be enabled by default.

TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 python main.py --use-pytorch-cross-attention

You can also try PYTORCH_TUNABLEOP_ENABLED=1, which may speed things up at the cost of a slow initial run.

Notes

  • Only nodes that have all required inputs connected will execute.

  • Only the parts of the graph that change between runs are re-executed. Submitting the same graph twice runs it only once. Changing a node re-executes only that node and its dependents.

  • Dragging a generated PNG onto the page (or loading one) restores the full workflow, including the seeds used.

  • Use () to adjust prompt emphasis: (good code:1.2) or (bad code:0.8). Default weight for () is 1.1. Escape literal parentheses with \( and \).

  • Use {option1|option2} for wildcard/dynamic prompts — the frontend randomly picks one each time you queue. Escape literal braces with \{ and \}.

  • Dynamic prompts support C-style comments: // comment or /* comment */.

  • To use a textual inversion embedding in a prompt, place it in models/embeddings/ and reference it like:

    embedding:embedding_filename.pt
    

    The .pt extension is optional.

How to show high-quality previews?

Use --preview-method auto to enable previews.

The default installation includes a fast but low-resolution latent preview. To enable higher-quality previews with TAESD:

  1. Download taesd_decoder.pth, taesdxl_decoder.pth, taesd3_decoder.pth, and taef1_decoder.pth and place them in models/vae_approx/.
  2. Restart ComfyUI and launch with --preview-method taesd.

How to use TLS/SSL?

Generate a self-signed certificate and key (not appropriate for shared/production use):

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes \
  -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"

Then launch ComfyUI with:

python main.py --tls-keyfile key.pem --tls-certfile cert.pem

The app will be accessible at https://... instead of http://....

Windows users: Use alexisrolland/docker-openssl or a 3rd party OpenSSL binary to run the command above. When using a container, the -v volume mount accepts a relative path — e.g. -v ".\:/openssl-certs" — which writes the key and cert to your current directory.

Support and Dev Channels

Frontend Development

The frontend is hosted in a separate repository: ComfyUI Frontend. This repo contains the compiled JS (from TS/Vue) under the web/ directory.

Reporting issues and requesting features

For frontend bugs, issues, or feature requests, please use the ComfyUI Frontend repository.

Using the latest frontend

The frontend in this repository is updated fortnightly. Daily releases are available in the frontend repository.

To use a specific version:

# Latest daily build
python main.py --front-end-version Comfy-Org/ComfyUI_frontend@latest

# Specific version
python main.py --front-end-version Comfy-Org/ComfyUI_frontend@1.2.2

Accessing the legacy frontend

python main.py --front-end-version Comfy-Org/ComfyUI_legacy_frontend@latest

Source: ComfyUI Legacy Frontend repository.

FAQ

Which GPU should I buy for this?

See the GPU recommendations wiki page.