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
| ComfyUI | Stable Diffusion WebUI (A1111 / Forge) | Online AI image generation services | |
|---|---|---|---|
| Interface | Node graph | Form | Input box |
| Ease of getting started | Higher | Medium | Lowest |
| Flexibility | Highest | Medium (with extensions) | Low |
| Support for new models | Fastest | Slower | Depends on the service |
| Graphics memory efficiency | Good | Medium | Not needed |
| Reusable / shareable workflows | Workflow file | Parameters | Limited |
| Cost | Free | Free | Subscription 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)
- Text Encoder / CLIP: Converts the prompt into vectors the model can understand.
- Diffusion model (UNet / Diffusion Transformer): Starts with noise and gradually "denoises" it according to the prompt.
- Sampler: Determines how to denoise at each step and how many steps to run in total.
- 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
| Term | Description |
|---|---|
| Checkpoint | A complete model file containing a diffusion model, text encoder, and VAE |
| LoRA | A small add-on model used to add a particular style, character, or object |
| ControlNet | A model that uses a reference image (line art, pose, or depth) to control composition |
| Latent | A compressed image representation used during model processing |
| Seed | A random seed. The same seed and parameters produce the same image |
| CFG | How strongly the prompt influences the result |
| Workflow | A 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