Install ComfyUI

From A Technological Wiki
Revision as of 22:44, 2 November 2025 by Root (talk | contribs) (Created page with "= Installation = == Installing on linux == Make sure you have '''Python 3.10 or higher''' and '''git''' installed: <syntaxhighlight lang="bash"> sudo apt install python3 python3-venv python3-pip git </syntaxhighlight> Clone the ComfyUI repository: <syntaxhighlight lang="bash"> git clone https://github.com/comfyanonymous/ComfyUI.git cd ComfyUI </syntaxhighlight> Create a virtual environment and install dependencies: <syntaxhighlight lang="bash"> python3 -m venv ven...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installation

Installing on linux

Make sure you have Python 3.10 or higher and git installed:

sudo apt install python3 python3-venv python3-pip git

Clone the ComfyUI repository:

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

Create a virtual environment and install dependencies:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run ComfyUI:

python main.py

The interface will open in your browser at http://127.0.0.1:8188

Installing on windows

Install Python 3.10+ from https://www.python.org/downloads/ During installation, enable Add Python to PATH.

Install Git for Windows from https://git-scm.com/download/win Open a terminal (PowerShell) and run:

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
python main.py

After installation, ComfyUI will start locally and open in your web browser.

Executing ComfyUI

You can start ComfyUI in different ways:

Standard mode

python main.py

With a specific model or workflow

python main.py --extra-model-paths=/path/to/models
python main.py --disable-auto-launch

Once running, open your browser and go to:

http://localhost:8188

Understanding workflows and nodes

What are workflows

A workflow in ComfyUI is a graph that defines how data (text prompts, models, images, etc.) flows between nodes to generate an image. Each workflow is saved as a .json file that can be shared or loaded into ComfyUI.

You can import a workflow by dragging the JSON file directly into the interface.

What are nodes

Nodes are the building blocks of a workflow. Each node performs a specific task, such as:

loading a model

encoding a text prompt

generating noise

decoding the latent image

Nodes are connected through inputs and outputs, creating a chain of operations that define the diffusion process.

Common node types include:

Checkpoint Loader - loads the main diffusion model (e.g. SDXL)

VAE Loader - loads a Variational Autoencoder

CLIP Text Encoder - processes text prompts

Sampler - controls the diffusion steps

Save Image - exports the final result

You can right-click the canvas to add new nodes or search for them by name.

ComfyUI folder structure

ComfyUI organizes its files in a clear directory structure:

/ComfyUI/models/checkpoints - main diffusion models (e.g. SDXL, SD1.5, SD2.1)

/ComfyUI/models/vae - Variational Autoencoders (VAEs)

/ComfyUI/models/clip - CLIP encoders for text and image embeddings

/ComfyUI/models/upscale - upscaling models

/ComfyUI/models/controlnet - ControlNet models for guiding generation

/ComfyUI/custom_nodes - external or user-made node scripts

/ComfyUI/input - user input images and resources

/ComfyUI/output - generated images

/ComfyUI/workflows - saved workflow files in JSON format

/ComfyUI/web - interface and static assets

Resources for models and components

You can expand ComfyUI by downloading compatible models and components from community repositories:

Diffusion models

civitai.com - community hub for diffusion models (SD1.5, SDXL, LoRA, etc.)

huggingface.co/models - official and community models

modelscope.cn/models - AI models for various domains

GGUF models

GGUF format is used for quantized models optimized for inference. You can find them at:

huggingface.co - TheBloke profile (repository of GGUF models)

github.com/ggerganov/llama.cpp - technical details on the GGUF format

VAE (Variational Autoencoders)

VAEs are used to improve image color, clarity, and detail. Common sources: civitai.com and huggingface.co (search for "vae-fp16" or "vae-ft-mse").

CLIP models

CLIP encoders transform text or images into embeddings. They are usually included with diffusion models, but standalone versions can be found on: huggingface.co/openai/clip-vit-large-patch14

LoRAs and ControlNets

These extend model behavior for styles, poses, or compositions. Available on: https://civitai.com/models (LoRA and ControlNet section) https://huggingface.co/models?q=controlnet