Your first ComfyUI workflow: text to image in 6 nodes
Six little boxes, a couple of wires - and an image out of nothing
Your first ComfyUI text-to-image workflow, node by node: Load Checkpoint, CLIP Text Encode, Empty Latent Image, KSampler, VAE Decode, Save Image. What each one does and how to connect the wires.
What a workflow in ComfyUI actually is, in plain terms
You open ComfyUI and a diagram of little boxes on wires stares back at you. Like someone took apart a TV remote and never put it back together. Relax. This isn’t a reactor and it isn’t code.
It’s an assembly line. A plain old factory assembly line. Your words go in one end, a finished PNG comes out the other. In between sit six machines, and each one does exactly one job, then pushes the part further down the belt. Those machines are the nodes A node is a little machine-box in ComfyUI. It takes something in, performs one operation, and hands the result out the other side. The whole workflow is built out of nodes. , and the belt between them is the wires. Hold onto that picture - it makes the rest easier.
Why bother learning the nodes instead of just hitting Generate
Sure, you can mash “Generate” blindly. Sometimes you’ll get lucky. But the moment you want to change the size, cut something out, or figure out why it came out as mush - without knowing the nodes, you’re stuck.
- You’ll know where to turn the knobs to make the image better, not scarier.
- You’ll stop copying other people’s workflows at random - you’ll actually see what’s inside.
- A red wire and an error will stop triggering panic. You’ll just fix it.
- Every lesson after this - LoRA, upscaling, inpainting - is the same belt plus a couple of new machines. One foundation for everything.
Nine out of ten “ComfyUI isn’t working for me” complaints come down to an unconnected wire or a node waiting for the wrong type of data. Get the basics down and these problems jump out at you immediately.
The six text-to-image nodes, in order
Let’s ride down the assembly line from left to right. This order is the whole logic of a workflow - learn it and the rest falls into place.
1. Load Checkpoint - hiring the artist
The first machine loads the checkpoint A checkpoint is the trained model itself - a big file that knows how to draw. It lives in the models folder, in the checkpoints subfolder. Different checkpoints draw in different styles: realism, anime, painting. - the model that actually knows how to draw. This is your artist. Whoever you hire defines the style: one paints like a photographer, another like an animator.
The node has three outputs. MODEL is the artist’s brain. CLIP is its ears, so it can understand words. VAE is its translator into pixels. From here, that trio splits off to different machines.
2 and 3. CLIP Text Encode - what to draw and what NOT to draw
Here you’ve got two identical machines. They take your text and translate it into the model’s language - it doesn’t understand plain human words directly.
- Positive prompt - what you want to see: “ginger cat in glasses, soft light, photo”.
- Negative prompt - what you DON’T want to see: “blurry, extra fingers, text, watermark”.
4. Empty Latent Image - a blank canvas and the size
This machine hands you a blank canvas in the form of a latent A latent is the compressed internal representation of an image that the model works in. It's not pixels yet, just a compact 'rough draft' in the machine's memory. VAE converts it into pixels at the very end. . It’s not an image yet, just a blank made of pure noise, out of which the model will “develop” the picture.
This is also where you set the size - width and height - and how many images to crank out at once (batch size). The size is no small thing: every model is trained for its own native size. Set it too big and you’ll get duplicates and artifacts. Plenty of beginners have learned this the hard way - don’t be one of them.
5. KSampler - the heart of generation
The main machine. Almost everything converges here: the artist (MODEL), both word lists (positive and negative), and the blank canvas (latent). And this is where the magic everyone came for happens: the model strips noise off the canvas, pass after pass, step by step, until your described image emerges from the fog.
KSampler KSampler is the node that turns noise into an image step by step, guided by your prompts. The heart of generation. is where you turn the main knobs. Here are the ones that matter most:
- steps - how many times noise gets stripped away. More is cleaner but slower. 20-30 is usually plenty.
- cfg - how strictly to obey the prompt. Crank it and the image gets 'overcooked'. Keep it at 6-8.
- seed - the seed of randomness. Same seed = exact same result, down to the pixel.
- sampler_name - the algorithm. The default is usually fine; play with it later.
- scheduler - how exactly the noise gets removed. Leave it on the default to start too.
- denoise - for text-to-image, keep it at 1.0. We'll touch it in the image-to-image lesson.
6. VAE Decode and Save Image - from latent to a finished file
KSampler produced an image, but it’s still a latent - in “machine language”. VAE Decode translates it into normal pixels your eyes can see. And Save Image drops the finished file onto your disk, by default into the output folder. The assembly line has reached the end.
Wires in ComfyUI: why they come in different colors
A wire isn’t decoration. It tells a machine: “take the part from that machine over there”. And there’s an iron rule: wire color = data type. You can only connect matching colors. There’s no way to physically mix them up.
- pink/purple - MODEL (the artist’s brain, goes into KSampler);
- yellow - CLIP (from the checkpoint to the two text machines);
- orange - CONDITIONING (the translated words, from the text nodes into KSampler);
- red - VAE (the pixel translator, into VAE Decode);
- pinkish-red - LATENT (the canvas and the result, circulating in the middle);
- blue - IMAGE (the finished pixels, into Save Image).
How to run your first generation from scratch
The best part: the default workflow is already assembled for you. You don’t have to place six nodes by hand - you load the template and swap the words.
- Open ComfyUI. In the top menu, find the workflow templates and pick the basic text-to-image one (Image Generation). The six nodes appear on their own.
- In the Load Checkpoint node, pick any installed model from the list. If the list is empty, the model isn’t downloaded: drop the file into the models folder, checkpoints subfolder, and refresh.
- In the top text node (positive), type what you want: a ginger cat in glasses sitting by a window, soft morning light, detailed photo.
- In the bottom text node (negative), type what you DON’T want: blurry, low quality, extra limbs, text, watermark.
- In Empty Latent Image, leave the size at the default. Don’t chase a giant canvas on your first run.
- Hit Queue (run it). Wait - and your image will appear in the Save Image node. The file is already sitting in the output folder.
Common beginner mistakes in ComfyUI
- Swapping positive and negative. Put “beautiful” in the negative and the model will diligently avoid beauty. Double-check: the top KSampler input is usually positive, the bottom one negative.
- Dragging the wrong-color wire. It won’t stick = wrong spot. Look for an input of the same type instead of tugging harder.
- Going huge on the size right away. A big canvas in Empty Latent Image gives you duplicates and mush. Start at the model’s native size.
- Turning every KSampler knob at once. Change one at a time, or you’ll never know what worked. Start with steps and cfg.
- An empty list in Load Checkpoint. The interface isn’t broken - you just have no models. Download a checkpoint and drop it in the right folder.
- Hunting for the image “somewhere in the app”. The file is always on disk - in the output folder next to ComfyUI. Not where you’re looking.
TL;DR - если коротко
- The default workflow is an assembly line of six nodes, stitched together with wires. Data flows left to right, and that's it.
- Load Checkpoint is the artist (the model). The two CLIP Text Encode nodes are what to draw (positive) and what NOT to draw (negative).
- Empty Latent Image is the canvas and the size. KSampler is the heart: it sculpts the image out of noise based on your words.
- VAE Decode turns the result into normal pixels. Save Image drops the file onto your disk.
- Wire color = data type. Only matching colors connect - you literally can't mix them up.
- You don't wire anything by hand: you load a ready-made template and swap the words. One minute, and you're off.