What this lesson covers.
This module is one of 42 in the curriculum. Below is the canonical interactive lesson — tabs, cards, and diagrams from the source repo, rendered inside the course shell. There is no audio narration for this module - it ships as text + interactive lesson only.
If you prefer to read first and play with the demos after, the interactive lesson sits below this section. If you'd rather hear it narrated while you scroll, hit play on the sticky audio bar at the top — or just let it autoplay.
Read / reason / test
Each edge carries a particular object
High school · build the intuition
A workflow graph represents dependencies, but not every connection carries the same kind of data. Images, latent tensors, conditioning and models are different objects. Trace each edge and ask what the receiving node expects. Saving a graph alone may not reproduce a result because model files, node versions and settings can live outside it. Record those dependencies too.
College · work the example
In an authored chain, a loader supplies model components, an encoder supplies conditioning, a sampler produces latents and a decoder produces pixels. Sending pixels where latents are expected is a conceptual type mismatch. Record versions and seeds, while recognizing that hardware and numerical kernels can still affect reproducibility. A graph that opens is not necessarily a graph whose complete dependencies are available.
Explain it back
Describe the process in your own words. Identify the assumption that makes this example work, then explain one conclusion it cannot establish.
Read the primary source or official documentation →
The numerical examples are authored teaching exercises, not measured model benchmarks. This extension adds context to the original lesson.
The lesson itself.
ComfyUI — Workflow as Code
Node graphs as version-controllable artifacts · the dataflow paradigm for image gen
The image-gen pipeline is a dataflow, not a sequence of calls
A ComfyUI workflow is a .json file you can version-control
workflow.json sits next to the output image. Treat it like code: commit it, diff it, share it. A typical Stable Diffusion workflow is 8-15 nodes; an advanced pipeline with ControlNet + IP-Adapter + LoRAs + upscaler easily hits 40-60 nodes. The JSON is the reproducible artifact.The ecosystem fragments, then re-converges
From the desktop UI to a serving endpoint
Try it: comfyui workflow graph.
Drag-and-drop node graph. Connect outputs to inputs, see a real Stable Diffusion workflow build itself.
Further reading.
The canonical references for this module. External links open in a new tab.
What to read next.
Use the pager below to move sequentially through the curriculum, or jump to any module from the course index. Each track has a "Prereq: ↑ foundation" callout so you can backfill anything that wasn't clear.