Read a ComfyUI Workflow Graph
Understand the roles of model, prompt, latent, sampler, decode, and save nodes before changing a workflow.
Learning objectives
- Identify the major stages in a workflow graph
- Trace inputs and outputs without guessing
- Save a reproducible baseline before experimenting
ToolDix original visual
Frame
Name the outcome and constraints.
Build
Try one bounded workflow.
Review
Keep evidence, revise, and share.
The first time you open somebody else's ComfyUI workflow, it looks like a wiring diagram for a substation. Forty boxes, coloured cables crossing each other, and a dozen node names you have never seen. The instinct is to find the prompt box, type something, and hit run — and that instinct is correct as a first move. It is a bad second move, because when the output is wrong you will have no idea which of the forty boxes to touch.
This lesson is about the reading skill that comes before the editing skill. It takes about twenty minutes to learn and it makes every subsequent workflow you open substantially less intimidating.
Read backwards, not forwards
A graph has no obvious start. It does have an obvious end: the node that saves or previews the final image. Find that node first and trace backwards along its input cable, then that node's inputs, and so on. What you get is the spine — the chain of nodes that actually determine the output.
This matters because real workflows contain branches that go nowhere. Somebody was testing an upscaler, bypassed it, and shipped the graph with the dead branch still attached. Reading forwards, you will spend five minutes on nodes that have no effect. Reading backwards, you never see them.
Almost every image workflow has the same six stages, in the same order, whatever the node names happen to be:
Model loading brings weights in from disk — the checkpoint, and often a separate VAE, one or more LoRAs, and a ControlNet. Everything downstream inherits assumptions from here. A workflow built for an SDXL checkpoint will behave strangely if you point it at an SD 1.5 file, and the error, when it comes, will surface several nodes later.
Conditioning turns your prompt text into something the sampler can steer with. Note that positive and negative prompts are two separate encoder nodes feeding two separate inputs. They are not one field with a minus sign, and confusing them is the most common beginner error.
Latent is the canvas. For text-to-image it is an empty latent whose width and height set the output resolution. For image-to-image it is an existing image pushed through a VAE encoder. The distinction is what separates the two workflow families.
Sampling is the loop that does the work: steps, scheduler, CFG scale, denoise, seed. This is where nearly all of your experimentation time will go.
Decode converts the latent back to pixels through the VAE. If your images come out desaturated, oddly tinted, or slightly mushy while the composition is right, suspect a VAE mismatch before you touch the prompt.
Output saves or previews. ComfyUI embeds the full workflow into the PNG metadata, which is a genuinely useful property we will come back to.
Four kinds of node
You will meet unfamiliar nodes constantly. You do not need to know what each one does. You need to place it in one of four categories, which you can do from its inputs and outputs alone.
- Brings something in from disk
- Checkpoint, LoRA, image, mask
- No inputs, only outputs
- Changes a representation
- Encode, upscale, crop, combine
- Same kind in, same kind out
- Shapes what the sampler does
- Conditioning, ControlNet, mask
- Feeds the sampler, not the image
- Produces the artifact
- Save, preview, send
- Outputs nothing downstream
A node with no inputs and one output is a loader. A node whose input and output are the same type is a transform — an upscaler, a crop, a latent composite. A node that outputs conditioning is a guide, and it feeds the sampler rather than the image path. A node with inputs and no outputs is an emitter.
Try this on the next unknown node you meet. "It takes conditioning and outputs conditioning, so it modifies guidance somehow" is enough to keep reading. You can look up the specifics later, if it turns out to matter.
Cable colours help here too. ComfyUI colours connections by data type, so a purple model cable cannot plug into an orange conditioning socket. When the interface refuses a connection, it is telling you something about types, not about your taste.
The baseline is the whole discipline
Here is the habit that separates people who make progress from people who thrash: save an untouched copy before you change anything.
Export the template as JSON, name it with the date, and put it somewhere you will not overwrite. Then change exactly one thing. Run it. Keep the output image next to the JSON that produced it — remember that the PNG contains the workflow, so the image is a saved graph, which makes this cheaper than it sounds.
Then write one sentence about what changed. Not a document; a sentence. "CFG 7 → 11: much more literal, lost the soft lighting." Twenty of those sentences accumulated over a week are worth more than any tutorial, because they are calibrated to your models and your taste.
The reason to change one thing at a time is not pedantry. Sampler settings interact: raising CFG and steps together can produce an improvement you then attribute to the wrong one, and you will carry that wrong belief into every future workflow.
Practice
Open one official template from the workflow templates repository. Do these in order:
- Find the save node. Trace backwards and write down the six stages in your own words.
- Identify every node that is not on that path. There are usually one or two.
- Export the JSON untouched. Call it
baseline-<date>.json. - Change only the positive prompt. Run. Keep the output.
- Restore the baseline. Change only the sampler steps. Run. Compare.
If step 2 turns up nothing, you have a clean template — which is what templates should be, and a useful contrast with the workflows you will find on sharing sites.
Common mistakes
Importing an unreviewed workflow. A downloaded graph can reference custom nodes you do not have, models you have not downloaded, and — in the case of some node packs — code that runs on your machine. Check what custom nodes a workflow requires before loading it, and get them from sources you would trust with shell access, because that is effectively what you are granting.
Treating resolution as a free parameter. The empty latent's dimensions are not arbitrary. Models are trained at particular resolutions, and generating far outside that range produces duplicated limbs and repeated structures. If you want a bigger image, that is what the upscaling stage is for.
Editing before reading. Ten minutes tracing a graph you did not write will save you an hour of changing settings that were never the problem.
Sources and license context
These references informed the lesson. ToolDix adds its own explanation, workflow, and practice rather than reproducing source material. Every link below leaves ToolDix and opens the publisher's own site in a new tab.
- ComfyUI Workflow Templates (opens github.com in a new tab)External · github.com (MIT)
- ComfyUI (opens github.com in a new tab)External · github.com (GPL-3.0)
Keep going
Read these next on ToolDix.
Original lessons that build on what you just read.