ComfyUI logoComfyUI
Home / Guide / ComfyUI AI

ComfyUI AI Explained: Checkpoints, Samplers, VAEs and LoRAs

ComfyUI is the workbench, not the AI. Learn what text encoders, denoisers, VAEs, samplers, LoRAs and ControlNets actually do in a graph.

Keyword · ComfyUI AIUpdated October 25, 20267 min read
The AI Models Behind Every ComfyUI Node — feature image

People often describe ComfyUI AI as if ComfyUI were itself an artificial intelligence. It is not. ComfyUI is the workbench: a graph editor and execution engine that loads AI models and passes data between them. The intelligence lives in the model files you put into its folders. Understanding that split, and knowing what each model component actually does, is what turns ComfyUI from a confusing tangle of wires into a tool you can reason about.

The application and the models are separate things

When you install ComfyUI you get code that can read model weights, schedule work on your GPU and display a canvas. You do not get a single trained network. That is deliberate. It means the same interface can run Stable Diffusion 1.5 from 2022, SDXL, Stable Diffusion 3.5, the Flux family, newer image-editing models, and video or audio models, simply by swapping the files that the loader nodes point at.

It also means quality, style and licensing come from the model you choose, not from ComfyUI. Two people with identical graphs and different checkpoints will get completely different pictures.

Anatomy of a diffusion checkpoint

Most image models used in ComfyUI are latent diffusion models. A single checkpoint file usually bundles three cooperating networks, and the Load Checkpoint node exposes them as three separate outputs.

The text encoder (CLIP output)

Your prompt is just text until a text encoder converts it into numbers the image model can use. Older models use one or two CLIP encoders; newer ones may add a large language-model-style encoder such as T5, which understands longer and more complex sentences. In ComfyUI the CLIP Text Encode node takes this output plus your prompt and produces conditioning, the vector that guides generation.

The denoising network (MODEL output)

This is the core of the system, usually a U-Net in older models and a diffusion transformer in many newer ones. It has learned, from enormous numbers of image and caption pairs, how to predict the noise present in a partially noisy latent image. Generation runs that prediction repeatedly, removing a little noise each time, until a clean latent remains.

The VAE (VAE output)

Diffusion does not happen on full-size pixels, which would be far too expensive. The variational autoencoder compresses images into a much smaller latent representation and expands them back. VAE Encode turns a picture into a latent for image-to-image work; VAE Decode turns the sampler’s finished latent into the image you see.

Why this matters in practice: when an image comes out washed-out or speckled, the cause is often the VAE, not the model. When the composition ignores your prompt, look at the text encoder and conditioning. Knowing which part is responsible tells you which node to change.

What the sampler actually does

The KSampler node is where the AI work happens. It takes the MODEL, positive and negative conditioning, and a starting latent. It then runs a loop for the number of steps you set:

  1. Look at the current noisy latent.
  2. Ask the model to predict the noise, once with your positive prompt and once with the negative prompt.
  3. Push the prediction towards the positive and away from the negative by an amount controlled by the CFG scale.
  4. Remove a portion of the predicted noise according to the scheduler.

The sampler name picks the mathematical method used for each step. Euler is simple and predictable, DPM++ 2M is a widely used all-rounder, and the “ancestral” variants add fresh noise each step, which gives more variety but means results never fully converge. The scheduler decides how much noise is removed at each step; Karras and similar schedules spend more steps on fine detail near the end.

The seed sets the starting noise. Same seed, same settings, same model: same image. This is why ComfyUI results are reproducible, and why locking the seed is essential when you test the effect of any single change.

The main model families you will meet

FamilyNative resolutionCharacter
Stable Diffusion 1.5~512 pxLight on VRAM, huge library of fine-tunes and LoRAs
SDXL~1024 pxBetter composition and detail, very large community ecosystem
Stable Diffusion 3.5~1024 pxTransformer-based, stronger prompt adherence and text rendering
Flux family~1024 px+High fidelity and prompt following, heavier hardware needs
Video modelsVariesGenerate short clips from text or images; demanding on VRAM

New families appear regularly, and ComfyUI often gains native support soon after release. Each family usually ships an example workflow; loading it is the quickest way to learn which loaders and settings that model expects, since newer models frequently load their text encoders and VAE through separate nodes instead of one checkpoint.

Smaller models that plug into the graph

LoRA

A LoRA is a small file, often tens or hundreds of megabytes, that nudges a base model towards a style, character or concept. The LoRA Loader sits between Load Checkpoint and everything else, modifying both MODEL and CLIP. Two strength values control how strongly it affects the image model and the text encoder. A LoRA only works with the base family it was trained for, so an SDXL LoRA will not behave correctly on an SD 1.5 checkpoint.

Embeddings

Textual inversion embeddings teach the text encoder a new word. They are tiny and are invoked inside the prompt with the syntax embedding:name. They are commonly used in negative prompts to suppress recurring defects.

ControlNet and adapters

ControlNet models take an extra image, such as a depth map, an edge map or a pose skeleton, and force the generated image to follow its structure. The Apply ControlNet node merges this guidance into your conditioning, with strength and start or end percentages controlling how long it applies. Image prompt adapters work similarly but transfer the look of a reference image rather than its layout.

Upscale models

These are not diffusion models but super-resolution networks. They enlarge an image two or four times while sharpening edges. A common pattern is to upscale with such a model and then run a short, low-denoise diffusion pass to invent fine texture at the larger size.

How ComfyUI manages AI models in memory

One of the reasons ComfyUI became popular is careful memory handling. It loads a model to the GPU only when a node needs it, keeps recently used models cached when there is room, and offloads parts to system RAM when there is not. Launch options let you shape that behaviour:

Model precision matters too. Many checkpoints are distributed in fp16, and some newer models are offered in fp8 or quantized formats that cut VRAM use substantially, often with only a small loss in quality.

Choosing the right model for a project

Start from the output you need and work backwards:

Always read the model card. It tells you the recommended sampler, step count, CFG range, resolution and, critically, the license that governs how you can use the output.

A note on responsible use

Running models locally puts the responsibility for how you use them on you. Avoid generating realistic images of real people without consent, respect the license terms of each model, and be transparent when synthetic images are used where viewers might assume they are photographs.

Reading an AI graph from left to right

With the components named, any shared workflow becomes easier to read. Start at the far left and look for the loaders: these tell you which AI models the graph depends on. Follow the yellow CLIP wire to the text encoders to find the prompts. Trace the pink LATENT wire to see whether the graph starts from an empty latent, which means pure text-to-image, or from VAE Encode, which means it transforms an existing picture. Then find every sampler. One sampler means a single pass; two or more usually means a base pass followed by a refinement or upscale pass with a lower denoise value.

Finally, look at what happens after VAE Decode. Upscale models, face detailers, colour correction nodes and save nodes all sit here. Within a minute you can describe what a graph does in plain language, which is the first step towards changing it with confidence.

Denoise is the bridge between creating and editing

The denoise value on a sampler deserves special attention because it changes the role of the AI. At 1.0 the model ignores the starting latent and invents an image from scratch. At 0.5 it keeps the broad shapes and colours of the input while redrawing details. At 0.2 it only polishes texture. The same model and prompt therefore act as a generator, a restyler or a gentle enhancer depending on one number.

The takeaway

ComfyUI does not have one AI inside it; it has a place for every part of an AI pipeline. Once you see a checkpoint as a text encoder, a denoiser and a VAE, and the sampler as a loop that steers noise towards your prompt, every node on the canvas starts to make sense. From there, adding LoRAs, ControlNets and upscalers is simply a matter of plugging more specialised models into a structure you already understand.