Install ComfyUI

From A Technological Wiki
Revision as of 22:53, 2 November 2025 by Root (talk | contribs)
Jump to navigation Jump to search

ComfyUI overview

What is ComfyUI

ComfyUI is a powerful and modular graphical interface for running and creating Stable Diffusion workflows.

It allows you to build complex diffusion pipelines visually by connecting nodes, without needing to write code. It is designed for flexibility, performance, and transparency — letting you see exactly how each part of a diffusion model (VAE, CLIP, sampler, etc.) is connected and processed.

Typical uses include:

  • Generating AI images from prompts
  • Testing new model configurations
  • Combining multiple models, VAE encoders, or samplers
  • Automating image generation pipelines

ComfyUI is often used by AI artists, researchers, and developers who want both power and control over their diffusion workflows.

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

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

https://huggingface.co/models - official and community models

https://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:

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

https://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:

CLIP models

CLIP encoders transform text or images into embeddings.

They are usually included with diffusion models, but standalone versions can be found on:

https://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