← Back to Projects

Mastering ComfyUI — Part 3: Building Your First Workflow

Build a complete, working text-to-image workflow from a blank canvas, run it, and learn to read what ComfyUI tells you when something's wrong — the hands-on skill, not just node theory.

N
NOTE

Goal for this part: build a complete, working text-to-image workflow from a blank canvas, run it, and know how to read what ComfyUI tells you when something's wrong — the actual hands-on skill, not just node theory.

Previous: Part 2 — Core Node Reference

N
NOTE

Prerequisite: at least one checkpoint file (SDXL or similar) sitting in your models/checkpoints/ folder. If nothing shows up in Load Checkpoint's dropdown later in this walkthrough, that's why.

Step 1 — Start from a genuinely empty canvas

Open a new, blank workflow tab. You should see nothing but empty dark canvas.

Step 2 — Place your first node

Double-click anywhere on the empty canvas. A search box appears. Type "Load Checkpoint" and click the matching result. A node appears wherever you double-clicked, with a MODEL, CLIP, and VAE output on its right edge, and a checkpoint dropdown widget.

Click that dropdown and select whichever checkpoint you have installed.

Step 3 — Add your prompt nodes

Double-click empty canvas again, search "CLIP Text Encode", and place it. Do this twice — you need one for your positive prompt and one for negative.

Now wire them: click and hold on Load Checkpoint's CLIP output dot, drag to one CLIP Text Encode node's clip input, and release. Repeat for the second one — one output can feed multiple inputs, so this is a normal, correct thing to do.

Type an actual prompt into one node's text box (this will be your positive), and something like blurry, low quality, watermark into the other (your negative — a placeholder is fine to start, you can build a fuller one later).

Step 4 — Set your canvas size

Search and place an "Empty Latent Image" node. Set width and height — 1024×1024 is a safe default for SDXL-family checkpoints. Leave batch_size at 1 for now (higher values generate multiple images per run, at proportionally higher VRAM/time cost).

Step 5 — Add the sampler

Search and place "KSampler". This is the node with the most connections, so take it slowly:

  • Drag Load Checkpoint's MODEL output → KSampler's model input
  • Drag your positive CLIP Text Encode's CONDITIONING output → KSampler's positive input
  • Drag your negative CLIP Text Encode's CONDITIONING output → KSampler's negative input
  • Drag Empty Latent Image's LATENT output → KSampler's latent_image input

Leave the widget defaults for now (steps: 20, cfg: 7.0, sampler_name: dpmpp_2m, scheduler: karras, denoise: 1.0) — Part 2 covers when and why to change these.

Step 6 — Decode and save

Search and place "VAE Decode". Wire KSampler's LATENT output → its samples input, and Load Checkpoint's VAE output → its vae input.

Search and place "Save Image". Wire VAE Decode's IMAGE output → its images input.

Step 7 — Run it

Click the Run button (top right). A queue panel appears showing progress. When it finishes, your image appears either inline near the Save Image node or in ComfyUI's output folder, depending on your view settings.

Reading errors when something's wrong

If Run produces an error banner instead of an image, click into it — ComfyUI tells you specifically what's missing or malformed, not just "it failed." The two most common first-workflow errors:

!
BUG

"Missing Models" / a red-outlined node. Something references a model file ComfyUI can't find. Check the exact filename it's looking for against what's actually in your models folder — a near-miss filename (different casing, a missing version suffix) is a common cause.

!
BUG

A specific input dot showing as unconnected. ComfyUI will refuse to run with a required input left empty. Every node in the six listed above needs every one of its inputs wired — if you skipped connecting, say, the negative prompt to KSampler, that's what gets flagged.

T
TIP

Isolate, don't guess. When something looks wrong in the output rather than an outright error (bad composition, wrong colors, garbled details), resist the urge to change five things at once. Change one setting, re-run, compare. The queue history keeps your previous results around specifically so you can compare before/after a single change.

What you just built, and where to go from here

This six-node graph — Load Checkpoint → two CLIP Text Encode nodes → Empty Latent Image → KSampler → VAE Decode → Save Image — is the skeleton every other workflow in this series builds on. LoRAs (Part 4) insert between Load Checkpoint and the rest. Regional conditioning and inpainting (Part 5) change what feeds KSampler's positive and latent_image. Upscaling (Part 6) adds a stage after VAE Decode. None of it replaces this core shape — it's always this same skeleton with something added.

Next: Part 4 — LoRAs & Model Customization.

Previous: Part 2 — Core Node Reference