Skip to main content
tutorial

ComfyUI Tutorial #2: Understanding the Canvas

Angry Shark Studio
14 min read
ComfyUI AI Tutorial Node-Based Workflow Nodes Workflows Stable Diffusion Image Generation Beginner Guide

ComfyUI Tutorial #2: Understanding the Canvas

Your Brain on Nodes

Remember that feeling when you first saw ComfyUI’s interface? All those boxes and lines connecting them? It might have looked overwhelming at first.

Here is the thing: nodes look complex at first, but they are actually your creative superpower.

Think about it this way: Would you rather have a tool with three preset options (Small, Medium, Large), or would you rather have a modular workshop where you can build anything you want? ComfyUI chose the modular approach. And once you understand it, you will appreciate the flexibility.

In Tutorial #1, you ran ComfyUI and generated your first image. Now we are going to go deeper and understand how everything actually works.

By the end of this tutorial, you are going to:

  • Understand what nodes really are (and why they matter)
  • Build your first custom workflow from scratch
  • Learn to read any workflow you encounter
  • Master the essential nodes you need for image generation

Let us transform confusion into confidence.

ComfyUI beginner journey: confused person facing tangled workflow nodes transforming into confident user mastering connected node-based AI image generation


The Node Philosophy: Thinking in Workflows

What Even IS a Node?

A node is just a tiny specialist. It does one job really well, then hands off the result to the next worker.

Think of it like this:

Traditional image editor: One giant chef who does EVERYTHING, chops vegetables, cooks the meat, makes dessert, washes dishes. If you want to change how the vegetables are chopped, you have to watch the chef do the entire meal again from scratch.

ComfyUI with nodes: A kitchen with specialist stations. One person chops, one person cooks, one person plates. Want different chopping? Just swap out the chopping station. Everything else stays the same. The ingredients flow from station to station until you have a finished meal.

ComfyUI node philosophy metaphor: single all-in-one chef versus specialized cooking stations demonstrating modular workflow design for AI image generation

Why Nodes Are Actually Brilliant

Traditional way: Click generate → Wait → Don’t like it → Change 5 settings → Generate again from scratch → Wait again → Still not perfect → Repeat

Node way: Build your workflow once → Change just the part you want → Everything else stays the same → Faster results → Mix and match pieces → Experiment without rebuilding

Nodes let you:

  • See exactly what is happening at each step
  • Reuse successful parts of workflows
  • Experiment with different approaches side-by-side
  • Fix problems easily (you can see exactly where things go wrong)
  • Share your exact process with others

Key Concept

Nodes = Specialists doing one job

Workflows = Specialists working together

You = The director deciding who does what

The canvas = Your workspace to arrange everything


Anatomy of a Node

Let us crack open a node and see what is inside. Every node has three parts, and once you learn these, you can understand any node.

ComfyUI KSampler node anatomy diagram: input connections on left, generation settings in center, latent output on right for AI image workflow

The Left Side: INPUTS (What Goes In)

This is where your node receives stuff from other nodes. Think of these as connection ports, you plug other nodes into these ports.

Each input has:

  • A name (tells you what kind of data it expects)
  • A connection dot (where you plug in the connection line)
  • Sometimes a data type shown in ALL CAPS (like MODEL, CONDITIONING, LATENT)

Example: A KSampler node needs:

  • model - Which AI model to use
  • positive - What you WANT in the image
  • negative - What you DON’T want
  • latent_image - The noise to start from

You cannot just plug anything anywhere. It is like trying to charge your phone with the wrong cable, wrong connector type. ComfyUI will not let you make impossible connections.

The Middle: SETTINGS (How It Works)

This is the node’s control panel. These are values YOU set directly, no connections needed.

Think of these as the dials and buttons on your toaster. You set them once, and the node uses those settings to do its job.

Example: KSampler settings:

  • steps: How many refinement passes (more = better quality, slower)
  • cfg: How much to follow your prompt (higher = stricter adherence)
  • sampler_name: Which algorithm to use
  • scheduler: How to progress through steps
  • denoise: How much to change from the starting image

These are your creative controls. Change a setting, see different results. Settings are node-specific, each type of node has its own unique set of controls based on what it does.

The Right Side: OUTPUTS (What Comes Out)

This is what the node produces after doing its job. Think of these as export ports, you plug these into other nodes.

A node can have multiple outputs. The KSampler outputs:

  • LATENT - The processed latent space image (needs decoding)

Other nodes might output:

  • MODEL - A loaded AI model
  • CONDITIONING - Processed text prompts
  • IMAGE - Actual pixels you can see

The golden rule: Outputs from one node plug into inputs of the next node. That is the whole system.

One output can connect to many inputs simultaneously, like a power outlet with a splitter. You can send the same MODEL output to multiple KSamplers, or the same image to multiple save locations.

ComfyUI node factory metaphor: data inputs as conveyor belts, processing controls in center, outputs as finished products for Stable Diffusion workflow


Making Connections: The Noodles That Bind

Time to connect some nodes. These connections are called noodles (seriously, that is what the community calls them), and they are how data flows through your workflow.

How to Make a Connection

  1. Click on an output dot (right side of a node)
  2. Drag to an input dot (left side of another node)
  3. Release - Connection made

The noodle appears, and now data flows from the first node to the second.

ComfyUI node connection tutorial: mouse cursor dragging wire from output dot to input dot showing 3-step process for connecting workflow nodes

Reading the Noodles

Colors matter. Each data type has its own color:

  • Purple/Magenta - MODEL (the AI itself)
  • Yellow - CONDITIONING (your prompts, processed)
  • Pink/Light Purple - LATENT (encoded image data)
  • Light Blue - IMAGE (actual visible image)
  • Light Red - VAE (encoder/decoder model)

When you see a workflow, follow the colored noodles to understand the flow.

Watch Out

Loose noodles = broken workflow

If you see a noodle just hanging in space (not connected on both ends), your workflow will not run. ComfyUI will show you an error. Always check that every input has a source.

Tip: Double-click a noodle to delete it. Right-click drag on the canvas to pan around. Scroll to zoom.

The Flow Direction

Data typically flows LEFT → RIGHT through your workflow. Think of it like reading:

  • Models load on the LEFT
  • Processing happens in the MIDDLE
  • Saving happens on the RIGHT

You can arrange nodes however you want, but following this convention makes workflows way easier to read (for you and others).

ComfyUI workflow data flow diagram: left-to-right processing from model loading through transformation to final image save in Stable Diffusion pipeline


Essential Nodes Every Beginner Needs

There are hundreds of nodes in ComfyUI. That can be overwhelming.

Here is the good news: You only need to learn 5 nodes to create images.

That is it. Five. Learn these, and you can generate any image. Everything else is just optimization, specialization, and advanced techniques.

1. Load Checkpoint

What it does: Loads your AI model into memory

Think of it as: Opening a recipe book to a specific recipe

Inputs: None (it is a starter node)

Settings:

  • ckpt_name - Which model file to load

Outputs:

  • MODEL - The AI that generates images
  • CLIP - The text understanding component
  • VAE - The encoder/decoder for images

Why you need it: You cannot generate anything without a model loaded. This is always your first node.

ComfyUI Load Checkpoint node showing three output connections: MODEL for AI model, CLIP for text encoding, and VAE for image decoding

Technical Note

A “checkpoint” is a snapshot of an AI model’s training. It contains everything the AI learned: the model weights (MODEL), how it understands text (CLIP), and how it converts between image formats (VAE). You can find thousands of community-trained models on Hugging Face and Civitai.

2. CLIP Text Encode (Prompt)

What it does: Converts your text prompt into numbers the AI understands

Think of it as: A translator converting English into “AI language”

Inputs:

  • clip - The text encoder from your checkpoint

Settings:

  • text - Your actual prompt (what you want)

Outputs:

  • CONDITIONING - Your prompt, AI-ready

Why you need it: The AI does not understand English. It understands vectors and embeddings. This node does the translation.

Important: You’ll use TWO of these, one for positive prompts (what you want) and one for negative prompts (what you DON’T want).

3. KSampler (The Magic Maker)

What it does: This is where image generation actually happens

Think of it as: The oven where all your ingredients bake into a cake

Inputs:

  • model - The AI
  • positive - What you want
  • negative - What you do not want
  • latent_image - Starting noise

Settings:

  • seed - Random number for reproducibility
  • steps - Quality passes (20-30 is typical)
  • cfg - Prompt strength (7-8 is typical)
  • sampler_name - Algorithm choice
  • scheduler - Step progression strategy
  • denoise - Transformation amount

Outputs:

  • LATENT - Generated image (still encoded)

Why you need it: This IS the AI generation. Everything else is prep and cleanup. This is the star of the show.

ComfyUI KSampler beginner settings guide: recommended 20 steps, CFG scale of 7, and random seed for Stable Diffusion image generation

Understanding Settings

The KSampler starts with pure noise (static), then gradually shapes it according to your prompts over many steps. Each step refines the image a little more. This process is based on diffusion models, which gradually denoise images to create coherent results.

More steps = better quality, but slower. Higher CFG = follows prompt strictly (but can look artificial). Lower CFG = more creative freedom (but might ignore your prompt).

4. VAE Decode

What it does: Converts the AI’s internal image format into actual pixels

Think of it as: Developing a photo from film into something you can see

Inputs:

  • samples - The latent image from KSampler
  • vae - The decoder from your checkpoint

Settings: None

Outputs:

  • IMAGE - Actual visible image

Why you need it: The KSampler works in “latent space” (compressed/encoded format). This converts it back to normal pixels you can view and save.

5. Save Image

What it does: Saves the final image to your drive

Think of it as: The “File → Save” button

Inputs:

  • images - The decoded image

Settings:

  • filename_prefix - What to name your images

Outputs: None (end of the line)

Why you need it: Otherwise, your image only exists in memory and disappears when you close ComfyUI.

Your saved images go to the Documents\ComfyUI\output\ folder by default (Windows) or ComfyUI/output/ (manual installation). You can customize the filename prefix to organize your generations.

ComfyUI essential nodes diagram: complete workflow showing Load Checkpoint, CLIP Text Encode, KSampler, VAE Decode, and Save Image connections for AI generation


Common Mistakes Beginners Make

Let us save you some headaches. Here are the top mistakes everyone makes:

Mistake #1: Forgetting the Negative Prompt

What happens: Your images have weird artifacts, extra limbs, or wonky text

Why: The negative prompt tells the AI what to AVOID. Without it, the AI might add common unwanted things.

Fix: Always use TWO CLIP Text Encode nodes, one for positive, one for negative. Connect both to the KSampler.

Quick negative prompt: "worst quality, low quality, blurry, text, watermark, signature"

Mistake #2: Running the Same Seed

What happens: Clicking the Run button produces the EXACT same image every time

Why: The seed number controls randomness. Same seed = same image.

Fix: In the KSampler settings, change control_after_generate to "randomize" or click the dice icon to randomize the seed manually.

ComfyUI KSampler seed control: random seed option for generating unique AI images versus fixed seed for reproducible Stable Diffusion results

Mistake #3: Too Few Steps

What happens: Images look rough, undefined, or sketchy

Why: The sampler needs enough steps to refine the image. Too few = incomplete generation.

Fix: Use at least 20 steps for testing, 30-40 for final images. More steps = better quality but slower generation.

Mistake #4: Disconnected Nodes

What happens: ComfyUI shows an error and will not generate

Why: Every required input needs a connection. Missing connections break the workflow.

Fix: Before clicking Run, scan for any inputs without connections. They’ll look empty. Connect them or remove unused nodes.


Hands-On: Build a Custom Workflow From Scratch

In Tutorial #1, you ran the default workflow and generated your first image. Now you are going to build your own workflow from absolute zero. No templates, just you and the nodes.

Step 0: Clear the Canvas

If you have anything on your canvas from last time:

  1. Select all (Ctrl+A / Cmd+A)
  2. Delete (Delete key or Backspace)
  3. Fresh, empty canvas

Step 1: Add the Load Checkpoint Node

  1. Right-click anywhere on the canvas (or double-click to bring up node search)
  2. Type “Load Checkpoint” in the search box
  3. Click “Load Checkpoint” from the results
  4. The node appears
  5. Click the ckpt_name dropdown
  6. Choose the SD1.5 model you downloaded in Tutorial #1

ComfyUI node search interface: right-click canvas menu showing searchable node library with Load Checkpoint selection for building custom workflows

Note: Do not see any models in the dropdown? Make sure you completed Tutorial #1 where you downloaded the SD1.5 model.

Step 2: Add Two CLIP Text Encode Nodes

  1. Double-click → Search for “CLIP Text Encode”
  2. Add one node → Place it to the right of Load Checkpoint
  3. Right-click again → Add a second CLIP Text Encode node
  4. Place it below the first one

Now connect them: 5. From Load Checkpoint’s CLIP output (green) → drag to first CLIP Text Encode’s clip input 6. From Load Checkpoint’s CLIP output → drag to second CLIP Text Encode’s clip input

Now add your prompts: 7. In the first node (positive), type:

a beautiful mountain landscape, sunset, dramatic clouds, photorealistic, highly detailed
  1. In the second node (negative), type:
    low quality, blurry, watermark, text
    

ComfyUI dual CLIP Text Encode setup: positive and negative prompt nodes both connected to Load Checkpoint for controlled AI image generation

Step 3: Add an Empty Latent Image Node

  1. Double-click → Search for “Empty Latent Image”
  2. Add it → Place it near your CLIP nodes
  3. Leave the default settings (512x512 is fine for testing)

What this does: Creates a blank canvas of noise for the AI to work with.

Step 4: Add the KSampler Node

  1. Double-click → Search for “KSampler”
  2. Add it → Place it to the right of your previous nodes
  3. Now make ALL these connections:

Connect these inputs:

  • Load Checkpoint’s MODEL output (purple) → KSampler’s model input
  • First CLIP Text Encode’s CONDITIONING output (yellow) → KSampler’s positive input
  • Second CLIP Text Encode’s CONDITIONING output (yellow) → KSampler’s negative input
  • Empty Latent Image’s LATENT output (pink) → KSampler’s latent_image input

Adjust settings: 4. Set steps to 20 (good starting point) 5. Set cfg to 7 (balanced) 6. Leave other settings at defaults

Key Understanding

The KSampler is the HEART of your workflow. Everything feeds INTO it: the AI model (what brain to use), your prompts (what to create), and the starting canvas (where to paint). It outputs the generated image (in latent format).

Step 5: Add VAE Decode Node

  1. Right-click → Search for “VAE Decode”
  2. Add it → Place it to the right of KSampler
  3. Make these connections:
    • KSampler’s LATENT output (pink) → VAE Decode’s samples input
    • Load Checkpoint’s VAE output (red) → VAE Decode’s vae input

Step 6: Add Save Image Node

  1. Right-click → Search for “Save Image”
  2. Add it → Place it to the right of VAE Decode
  3. Connect:
    • VAE Decode’s IMAGE output (dark red) → Save Image’s images input
  4. Optionally, change filename_prefix to something like "my_custom_workflow"

Step 7: Review Your Workflow

Checklist before generating:

  • All nodes connected?
  • Prompts entered?
  • Model selected?
  • No loose noodles?
  • Seed randomized?

ComfyUI complete beginner workflow: fully connected node chain from checkpoint loading to image save ready for Stable Diffusion generation

Step 8: Generate with Your Custom Workflow

This is it. Time to see your workflow in action.

  1. Find the Run button in the Queue Bar at the bottom center (or press Ctrl+Enter / Cmd+Enter)
  2. Click it
  3. Watch the progress bar on the KSampler node
  4. Wait… (first generation takes longer)
  5. Your image appears

The image will show up in the Save Image node preview and save to your output folder.

Celebration

You just built your first custom ComfyUI workflow from scratch

No templates. No copying. YOU did that. And here is the important part: you now understand the foundation for EVERY ComfyUI workflow. Everything else is just adding more nodes to this basic structure. Save this workflow. This is your foundation.

ComfyUI success celebration: user successfully generating their first AI image with custom node-based workflow in Stable Diffusion

Step 9: Experiment

Now that it is working, try changing things:

Easy experiments:

  • Change your positive prompt
  • Increase steps to 30
  • Try different cfg values (3, 7, 11)
  • Change the image size (768x768, 1024x1024)
  • Randomize seed and generate 5 different versions

This is your playground. Experiment. You cannot break anything.

Step 10: Save Your Workflow

Do not lose your creation:

  1. Click the Save button in the top menu (or press Ctrl+S / Cmd+Enter)
  2. Name it something like "basic_workflow_v1.json"
  3. It saves automatically to Documents\ComfyUI\user\default\workflows\

Tip: ComfyUI automatically embeds your workflow in every generated image. So every image you create already includes your workflow, just drag the image back onto the canvas later to reload it.


Saving and Loading Workflows

Saving Your Workflow

Click the Save button in the menu (or press Ctrl+S / Cmd+S), choose a filename, and it saves as a .json file to your workflows folder.

Important: ComfyUI automatically embeds your workflow in every generated image as metadata. You do not need to do anything special, just generate an image, and the workflow is saved inside the PNG file.

Loading a Workflow

Method 1: From Workflows Sidebar

  1. Click the workflows icon in the left sidebar
  2. Browse your saved workflows
  3. Click any workflow to load it instantly

ComfyUI workflow management: sidebar interface showing saved workflow files for organizing and loading custom AI image generation pipelines

Method 2: From Image

  1. Drag a generated image (with embedded workflow) onto the canvas
  2. Workflow loads automatically
  3. Works with images from your computer or dragged from websites

Pro Tip

The image = workflow trick is powerful. You can share your exact setup by just sharing the generated image. No separate files needed. The workflow data is invisible metadata inside the PNG. This is why you see people say “workflow included” when sharing ComfyUI images online. You can find thousands of example workflows in the ComfyUI GitHub repository and community forums.


What You Just Learned

Let us recap this tutorial:

  • Nodes are specialists - Each does one job well
  • Three parts - Inputs (left), Settings (middle), Outputs (right)
  • Noodles = data flow - Follow the colors
  • Five essential nodes - Checkpoint, CLIP (x2), KSampler, VAE Decode, Save
  • Read left-to-right - Start → Process → End
  • Common mistakes - And how to avoid them all
  • Save/load workflows - Even embed in images
  • Built from scratch - You created a complete custom workflow

Most importantly: You are not intimidated by nodes anymore. You understand how they work together. And that is the foundation.


Coming Up Next

In Tutorial #3: Mastering Generation Parameters, you will learn:

  • What seed, steps, CFG, and resolution actually do
  • How to create reproducible results (same seed = same image)
  • How to systematically experiment with variations
  • Finding the sweet spot for quality vs. speed
  • Advanced parameter techniques for better results

But for now? Generate some images. Change that prompt. Play with settings. Get familiar with your workflow.

The more you practice, the more intuitive it becomes. See you in the next tutorial.

Last updated: October 11, 2025

Angry Shark Studio Logo

About Angry Shark Studio

Angry Shark Studio is a professional Unity AR/VR development studio specializing in mobile multiplatform applications and AI solutions. Our team includes Unity Certified Expert Programmers with extensive experience in AR/VR development.

Related Articles

More Articles

Explore more insights on Unity AR/VR development, mobile apps, and emerging technologies.

View All Articles

Need Help?

Have questions about this article or need assistance with your project?

Get in Touch