Understanding Comfy UI, Chapter 1 — article by Sandaru Abeyratne, Software Engineer at ArkStatic

Understanding Comfy UI – Chapter 1

Welcome! This tutorial series will guide you through Stable Diffusion AI using the ComfyUI interface. We'll progress from beginner to advanced, explaining every concept simply and clearly. This first chapter discusses ComfyUI, its installation, and model downloads. By the end, you will generate your first image for free using your computer.

Understanding ComfyUI

Multiple Stable Diffusion interfaces exist. We use ComfyUI for its unmatched control and flexibility.

What is ComfyUI?

ComfyUI is a visual framework where you build image generation workflows by connecting tasks, called nodes

(blocks), with edges (lines). Each node performs a specific function, allowing complex image generation

processes.

Why use ComfyUI?

You might be asking: Why should I learn ComfyUI when platforms like ChatGPT (DALL-E) or Midjourney offer image generation with simple text prompts?

The difference comes down to control and purpose.

Ready-made apps are like ordering takeout—they are fast, easy, and give you a great meal. ComfyUI, on the other hand, is like owning the entire restaurant, from the kitchen layout to the ingredients.

  • Closed Ecosystems (e.g., ChatGPT/Midjourney):
    You input a text prompt and receive a finished image. You cannot see, modify, or control the intermediate steps (like the sampler, the noise level, or the data flow).

  • ComfyUI (Open Ecosystem):
    You build the entire image generation pipeline. This flexibility means you can achieve complex, highly specific tasks that are impossible in closed systems, such as:
    • Using different models or settings on separate parts of the same image.
    • Chaining multiple ControlNet conditions precisely.
    • Optimizing generation speed and VRAM usage for batch production.


ComfyUI isn’t just about image generation; it’s a tool for engineering complex AI workflows. If you want to move beyond simple prompting and gain total control over the artistic and technical process, ComfyUI is the definitive choice.

Advantages
  • Flexibility & Speed: Create and customize workflows quickly. Generation is fast and efficient once built.
  • Transparency: Every node’s function is visible, making the process easy to understand.
  • No-Code: Create workflows by dragging and dropping nodes.
  • Collaboration: Workflows are easily shareable and reusable.
Downsides
  • Inconsistency: Node organization varies in shared workflows, causing confusion.
  • Learning Curve: Effective use requires learning the system’s logic.
  • Performance: Complex workflows require adequate system resources.
Installation and System Requirements

Installation is straightforward using the portable version.

System Requirements

For a smoother experience, ensure your system meets these specifications:

  • RAM: 16 GB of RAM is recommended for efficient workflows.
  • VRAM/GPU: Image generation speed relies heavily on VRAM. Nvidia RTX cards are preferred for their speed, and you should aim for an Nvidia card with at least 8 GB of VRAM or more.

💡Nvidia RTX cards are preferred for speed. Aim for an Nvidia card with at least 8 GB of VRAM or more.

Installation (Windows + Nvidia) ❄️
  1. Visit the ComfyUI GitHub page: https://github.com/comfyanonymous/ComfyUI
  2. Click the direct download link for the portable version.
  3. Choose a storage location (e.g., your D drive).
  4. Extract the .7z archive (use 7Zip or WinRAR).
  5. Double-click run_nvidia_gpu_bat.bat.
  6. The command window will open, display GPU details, and launch ComfyUI in your browser.

💡 For easier access, right-click the official Desktop version file run_nvidia_gpu.bat, choose Send to → Desktop (create shortcut), and place it on your desktop. This makes launching ComfyUI much faster.

Interface Navigation
  • Zoom: Use the mouse wheel, or press Alt + and Alt -.
  • Move Canvas: Click and drag the background, or hold the Spacebar and move the cursor.
Downloading Your First Models (Checkpoints)

Before you generate your first image, you need a Model (often called a Checkpoint). As we discussed, think of this as the digital artist that knows how to create images.

Model Download and Placement

There are several places to download stable diffusion models from some of these are , Civit AI , Hugging Face Models and Shakker AI (Be aware some of these might contain potential NSFW content as well)

We'll Use CivitAI for Models

  1. Filter and Search: Use filters to select the SafeTensor format (safer than CKPT) and choose the model version you need (e.g., SDXL, v1.5).
  2. Download: Download your chosen models (e.g., Juggernaut SDXL for large, high-quality images, or Juggernaut v1.5 for faster, smaller images).
  3. Placement: Place the downloaded files in the following folder:
    ComfyUI → models → checkpoints

ℹ Again you don’t have to worry about the terminology for now since we’ll go through these thoroughly in the upcoming sections

Loading the Checkpoint
  1. In ComfyUI, locate the Load Checkpoint node.
  2. If your model doesn't appear in the list, click the Refresh button.
  3. Choose the desired model from the dropdown.
Core Concepts: Breaking Down the Default Workflow

The default workflow represents the standard Stable Diffusion process. Here is a quick rundown on what each node does:

ℹ We’ll try to keep the node typrd color coded that way it could be easier to group them throughout the tutorial series

Node Name What it Does Simple Analogy

Load Checkpoint

Loads the entire pre- trained model file diffusion model, CLIP, VAE .
The Artist’s Brain and Toolbox: The core knowledge base for the project.

CLIP Text Encode (Prompt)

Converts your text prompt into numerical data, or Conditioning, for the AI.
The Translator: Converts your language into precise instructions for the AI.

Empty Latent Image

Creates the initial canvas: pure, random noise in the compressed latent space.
The Unshaped Clay: The raw starting material to be shaped.

KSampler

The central engine. It uses your Conditioning to repeatedly remove noise from the Latent Image over steps.
The Sculptor: This is the central engine that uses your text instructions (Conditioning) to repeatedly refine the initial noise, gradually carving out the final image.

VAE Decode

Converts the final image data from the compressed latent space back into a viewable image format.
The Photographer: Its job is to convert the compressed image data (from the latent space) back into a viewable, high-resolution image.
Save Image
Saves the generated image to your disk.
The Archiver: Puts the final output into your portfolio folder.
Fine-Tuning Your Image: Model Settings
  • Image Size (in
    Empty Latent Image
    : Set width and height to match the model’s training size (e.g., 1024×1024).
  • KSampler
    Parameters :
    • Steps: Number of iterations the model uses to sculpt and refine the image.
    • CFG (Classifier-Free Guidance): Controls how strictly the image follows the prompt. Higher = stronger adherence.
    • Sampler / Scheduler: The mathematical denoising method (the “brush technique”) applied during image creation.
Saving Your Workflows 📌
  1. Click Save to store the configuration as a .json file.
  2. Click Load to restore a saved workflow.
  3. PNG Metadata Magic: Dragging a generated PNG image into ComfyUI automatically loads the exact workflow and settings used to create it.
Installing the ComfyUI Manager

The ComfyUI Manager is essential—it lets you easily install community extensions, custom nodes, and keep your software updated.

  1. Navigate to the ComfyUI Manager GitHub page: https://github.com/Comfy-Org/ComfyUI-Manager
  2. Open your main ComfyUI folder, and then navigate into the custom_nodes folder.
  3. Open Command Prompt (CMD): In the address bar of the custom_nodes folder, type cmd and press Enter.
  4. Install Command: Find the command window. Copy the git clone command (Step 2 on the GitHub page) and paste it into the CMD.
  5. Press Enter to install the manager.
  6. Restart ComfyUI: Close the command window and reopen ComfyUI using your desktop shortcut.

Once restarted, the Manager button will appear in the bottom-right corner. You can use it to update ComfyUI, install any missing nodes from shared workflows, and easily restart the application.

Next Steps: Ready to Build

Chapter 1: Complete! You have successfully installed ComfyUI, secured your base models (Checkpoints), and set up the indispensable Manager.

In the next chapter, we'll dive into the canvas and transform from users into builders. You will learn the mechanics of the interface, covering how to add, move, and connect every node to construct your first custom image generation workflow from scratch.

Author:

sandaru abeyratne

Share Now:

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments