Nodes/agate-comfyui/Agate Plan Viewer
ComfyUI Node

Agate Plan Viewer

Watch a tiny model decide where everything goes

By logolabs·Created about 15 hours ago·Updated about 12 hours ago· 0
Agate Plan Viewer
  • agate
  • latent_image
  • image
  • plan_frames
  • region_frames
  • prediction_frames
  • change_frames
  • panel
  • change_curve
  • latent
◄prompta minimalist logo of a fox head, orange, flat design, white background►
◄negative_prompt►
◄seed0►
◄steps50►
◄cfg3.0►
◄regions6►
◄frame_size256►
◄denoise1.00►

Most of what people argue about in this hobby - why the composition came out wrong, whether layout is decided early or late - is speculation. Agate Plan Viewer turns it into something you can look at, for one specific 260M model, in one node.

That's possible because of how Agate is built. It's a rectified flow generator with two parts: a thinker that writes a plan - a 640-channel map on a 16 × 16 grid, one cell per 16 × 16 pixels of the final image - and a renderer that paints the picture from that plan alone. The plan isn't a latent and isn't a thumbnail. It's explicit layout structure, produced before anything gets drawn. Agate Plan Viewer samples one image and records the plan at every denoising step, then hands you the whole trajectory as frames.

The inputs

They're Agate Sampler's inputs minus the two that don't apply here - autoguide and batch_size, since this records a single image - plus two dials that only control the visualisation. regions (default 6, range 2–10) is how many k-means clusters the plan is split into for the region view. frame_size (default 256, up to 1024, step 16) sets the pixel side of each output frame; the 16 × 16 plan is upscaled nearest-neighbour, so it's about legibility, not detail. denoise and the optional latent_image behave as on the sampler.

Then eight outputs, which is a lot of wires, so here's what each is for.

The outputs

image is the finished picture, decoded like Agate Generate. Handy detail: for the same seed it's the same image Agate Sampler gives you. Recording the plan doesn't perturb sampling - the author checked bit for bit, with and without CUDA graphs - so you never have to wonder whether you're looking at a different generation.

plan_frames is the plan as colour: its 640 channels projected to RGB with PCA, fitted once over all steps, so a colour means the same thing at step 5 and step 45. region_frames colours the plan by region from one k-means run over the pooled plan cells of every step, so a region keeps its colour over time instead of flickering. change_frames is how much each cell moved since the previous step (1 − cosine similarity): dark blue means nothing happened, red means a lot did. prediction_frames is the model's running guess at the final image, x̂₁ = z + (1 − t)·v, decoded with TAESD so it stays cheap.

panel puts those four side by side with a step label - the output you actually want, and the one to feed to Save Animated WEBP or Video Combine for a GIF of the model thinking. change_curve is a single plot image, mean plan change per step. latent is a standard SD 1.x latent, so the node doubles as a working sampler when you need one.

What you learn from it

The plan gets decided in the first few steps, then mostly stops moving. In the pack's dog-and-cat example ("a dog sitting to the left of a cat") the two animals are separate regions by step 6 of 50 - at which point the predicted image is still mush. Through the middle of the trajectory the plan is nearly frozen while the renderer adds detail, and only at the end does it move again, refining edges.

That isn't just pretty. It's the mechanical reason Agate's composition is stable so early, why 30 steps holds the layout of 50, and why feeding a latent back in at low denoise gives you variations of the same scene instead of a new one. It's also a clean look at a small model separating where things are from what they look like.

Installing and running it

Same install as the rest of the pack. ComfyUI Manager → search Agate → Install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/logolabs/agate-comfyui
pip install -r agate-comfyui/requirements.txt

Restart, and the nodes are under LogoLabs → Agate. You need the 522 MB agate-preview-001.safetensors in ComfyUI/models/agate/ - auto-downloaded, no login - fed in by Agate Loader, and agate_plan_viewer.json in example_workflows/ wires the whole graph. The PCA and k-means analysis runs on the GPU and needs no packages beyond the pack's own diffusers>=0.30 / transformers>=4.48 - that transformers floor matters here too, since an older one breaks the ModernBERT text encoder before you get anywhere near the plan.

Expect it to feel like a normal sample: 6.8 seconds per 50-step prompt on the author's RTX 4060, most of it ComfyUI encoding 50 preview PNGs and the animated WEBP rather than the model.

Snags

The frames add up. Every output except latent and change_curve is an IMAGE batch with one frame per step, so 50 steps at the default frame_size means 50 images per output, four of them combined in panel. Raise steps and frame_size together and you're pushing a lot of data through the graph for what's ultimately a diagnostic - drop to 30 steps while exploring.

The other errors are self-explaining but easy to hit: denoise < 1 with nothing wired to latent_image raises ("needs a latent_image to start from"), and denoise = 0 raises because an unchanged latent has no steps to view. If the model has no thinker output you get "this model has no thinker output to capture" - that means you aren't loading an Agate checkpoint, not that the node is broken. And it's the pack's showpiece, not its workhorse: slower than Agate Generate for one image, and it output-stuffs your graph. Use it when you're curious or genuinely diagnosing a bad layout, and use Agate Generate or Agate Sampler when you just want pixels.

CategoryLogoLabs/Agate

Inputs (10)

NameTypeDefaultDescription
agateAGATE_MODEL—
promptSTRINGa minimalist logo of a fox head, orange, flat design, white background—
negative_promptSTRINGThe unconditional prompt for CFG; empty is what Agate was trained with
seedINT00–18446744073709550000—
stepsINT501–200—
cfgFLOAT3.00–20—
regionsINT62–10Number of plan regions (k-means clusters) in region_frames
frame_sizeINT25664–1024Side of each frame in pixels (the 16 x 16 plan is upscaled with nearest neighbour)
denoiseFLOAT1.000–1With latent_image: how much to change it (as in Agate Sampler)
latent_imageoptLATENT—

Outputs (8)

NameTypeDescription
imageIMAGEThe final image, decoded like Agate Generate (the loader's decoder)
plan_framesIMAGEThe thinker's plan at every step (one frame per step): its 640 channels as RGB (PCA fitted over all steps, so a colour means the same thing throughout)
region_framesIMAGEThe plan's regions at every step: k-means over the plan cells of all steps, one colour per region
prediction_framesIMAGEWhat the model expects the final image to be at every step (x1 = z + (1 - t) v, decoded with TAESD)
change_framesIMAGEHow much the plan changed since the previous step, per cell (dark blue: not at all, red: most)
panelIMAGEOne frame per step: plan | regions | change | prediction with a label. Feed it to Save Animated WEBP / Video Combine
change_curveIMAGEThe mean plan change per step, as a plot
latentLATENTThe final SD 1.x LATENT, as Agate Sampler outputs it