Contents

ComfyUI Tutorial: What It Is and How Node-Based AI Image Generation Works

In a nutshell

ComfyUI is an open-source tool for building AI image generation workflows with nodes. Each node handles one task (loading a model, processing prompts, sampling, or saving images). Connect them with lines to create a "workflow."

Why use nodes?

Most AI image generation interfaces put all the options in a single form. You just click "Generate." This makes them easy to learn, but the workflow is fixed.

ComfyUI breaks the workflow into parts that you can combine freely:

  • Generate a small image → upscale it → then inpaint part of it
  • Use two ControlNets at once to control the pose and composition
  • Automatically remove the background, add text, and save an image in different sizes
  • Turn an image into a video

In ComfyUI, these tasks just require connecting a few more nodes.

Comparing it with other tools

ComfyUIStable Diffusion WebUI (A1111 / Forge)Online AI image generation services
InterfaceNode graphFormInput box
Ease of getting startedHigherMediumLowest
FlexibilityHighestMedium (with extensions)Low
Support for new modelsFastestSlowerDepends on the service
Graphics memory efficiencyGoodMediumNot needed
Reusable / shareable workflowsWorkflow fileParametersLimited
CostFreeFreeSubscription or pay per use

In recent years, most new open-source image and video models have prioritized support and example workflows for ComfyUI. As a result, ComfyUI has become a mainstream tool for local AI generation.

How AI image generation works

Understanding the basics helps you see what each node does. Most popular image models today are diffusion models:

Pure noise ──denoise──▶ Rough outline ──denoise──▶ … ──denoise──▶ Clear image
                       (each step follows the prompt's direction)
  1. Text Encoder / CLIP: Converts the prompt into vectors the model can understand.
  2. Diffusion model (UNet / Diffusion Transformer): Starts with noise and gradually "denoises" it according to the prompt.
  3. Sampler: Determines how to denoise at each step and how many steps to run in total.
  4. VAE: The model actually works in a compressed "latent space." At the end, the VAE decodes the latent into an image you can see.

ComfyUI's basic workflow represents each of these four parts as a node and connects them. After you finish the installation in the next section, you'll see them in the default workflow.

Common terms

TermDescription
CheckpointA complete model file containing a diffusion model, text encoder, and VAE
LoRAA small add-on model used to add a particular style, character, or object
ControlNetA model that uses a reference image (line art, pose, or depth) to control composition
LatentA compressed image representation used during model processing
SeedA random seed. The same seed and parameters produce the same image
CFGHow strongly the prompt influences the result
WorkflowA workflow that can be saved as JSON or embedded in a PNG image

Licensing and usage notes

  • ComfyUI itself is open-source software (GPL-3.0).
  • Each model has its own license, and some restrict commercial use. Read the license information on the model page before downloading a model.
  • Follow the law and platform rules when creating content. Don't impersonate others or infringe on their rights.

The next section starts the ComfyUI installation.

Updated October 12, 2026