AV ComfyUI Manual
02 / 64
Files
02
PART I · WORKFLOW ENGINEERING FOR COMFYUI

Node Literacy — the alphabet of ComfyUI

Before you can read a large workflow, you need to understand the basic data types and the inputs and outputs of a node. This chapter teaches you to look past the node name and identify what object it receives, what operation it performs, and what it passes downstream.

CONFIRMEDThis chapter defines the basic method for reading a ComfyUI graph and uses data types that are present in the current Hansen workflow.
01 · NODE ANATOMY

Every node answers three questions: what goes in, what happens, and what comes out

Read a node as a function, not by its label alone. Inputs are on the left, parameters are configured inside the node, and outputs are on the right. Once you understand the type of every socket, much of the graph stops being mysterious.

A professional habit is to identify the input and output types before changing a parameter. This prevents wasted attempts to connect incompatible parts of the graph.

02 · CORE DATA TYPES

The core “letters” of ComfyUI

TypeWhat it meansTypical example
IMAGEA pixel image or batch of imagesLoadImage → PreviewImage
MASKA single-channel map defining an area of effectSAM2 mask → composite / inpaint
LATENTA hidden image representation used by a diffusion samplerVAE Encode → KSampler
MODELA generative model object after loading or patchingCheckpoint / UNet loader → sampler
CLIPA text encoder / text-model interfaceLoader → CLIP Text Encode
CONDITIONINGEncoded text or control informationCLIP Text Encode → sampler / guider
VAEThe encoder/decoder between IMAGE and LATENTIMAGE → VAE Encode → LATENT
STRINGTextPrompt field → text encoder
INTAn integer valuesteps, width, height, seed selector
FLOATA floating-point valuedenoise, strength, CFG, weight
03 · IMAGE VS LATENT

IMAGE and LATENT are not the same thing

IMAGE exists in pixel space: it can be shown in PreviewImage, saved, processed with a mask, or sent to a preprocessor. LATENT exists in the hidden space used by the diffusion model and is consumed by the sampler.

An IMAGE therefore cannot be connected directly where a LATENT is expected. VAE Encode is required in one direction; VAE Decode is required in the other.

INFERRED

Debug rule

If a node “will not accept an image,” first check whether it expects LATENT, MASK or CONDITIONING rather than IMAGE.

04 · MASK

MASK defines the area of effect, not the image itself

A mask describes where an operation is allowed, blocked or blended. White and black only acquire meaning in the context of the downstream node, so mask polarity should never be assumed from habit.

In a production graph, always verify three things: mask size, polarity, and whether its coordinate space matches the image it is applied to.

05 · MODEL / CLIP / CONDITIONING

The model object and the prompt are different parts of the system

MODEL represents the generative network. CLIP or another text encoder converts a STRING prompt into CONDITIONING. The sampler then receives the model, conditioning and latent as separate inputs.

This is an important mental model: the prompt does not “live inside the sampler.” It is encoded in advance and passed in as a separate object.

06 · STRING / INT / FLOAT

Small data types can control very large branches

STRING, INT and FLOAT look simpler than IMAGE or MODEL, but they often form the control plane. A single INT may select the source in several selectors, while a single FLOAT can define denoise or weight for an entire branch.

A linked control input therefore matters more than a local widget value: when an input is connected, the effective value may come from elsewhere in the graph.

07 · SOCKET COMPATIBILITY

A wire can be read as a statement about data compatibility

Every link says that one node’s output is compatible with another node’s input. If ComfyUI does not allow two sockets to connect, the issue is usually a type mismatch or a missing conversion step between them — not the UI.

You needYou currently haveTypical conversion step
LATENTIMAGEVAE Encode
IMAGELATENTVAE Decode
CONDITIONINGSTRINGText Encode
MASKIMAGE / detection resultImageToMask or segmentation stage
CONTROL signalIMAGEPreprocessor + ControlNet/apply stage
08 · READING ORDER

How to read an unfamiliar node in 20 seconds

  • Check the type of every input.
  • Check the type of every output.
  • Determine whether the node transforms data or only routes it.
  • Separate linked inputs from local widget values.
  • Find one upstream source and one downstream consumer.
  • Only then inspect model names and parameters.
09 · PRACTICE

Practice: translate a small workflow from node language into plain language

Take any graph with 5–15 nodes. For each node, write down one input type, the operation, and the output type. Then describe the entire route in one sentence without using model names.

INFERRED

Readiness criterion

A learner is ready to move on to Graph Literacy when they can explain a route in terms of data types rather than relying only on specific model names.