Nodes/ComfyUI-DiffusionGemma/DiffusionGemma Trace
ComfyUI Node

DiffusionGemma Trace

Read the commit heatmap — DGemmaTrace shows when meaning froze

By shanevcantwell·Created 3 months ago·Updated 8 days ago· 1
DiffusionGemma Trace
  • canvas_trace
  • heatmap
  • summary
cell_px6
modecommit

The final text of a DiffusionGemma run is the least interesting thing it produced. What's actually worth reading is when each canvas position froze - which words committed early while the canvas was still hot, which stayed molten until the end, and where the model locked in early on something wrong and couldn't climb back out. DGemmaTrace is the node that turns that history into something you can look at.

You wire in the canvas_trace output from DGemmaSampler or DGemmaDenoise, and you get back a heatmap image plus a text summary. It's the "read what happened" half of the pack's instrumentation story - the sampler does the work, this node explains the work.

How it works

DiffusionGemma's annealing commits a fraction of the canvas at every step. DGemmaTrace renders that as a grid: one row per step, one column per canvas position, brightness showing what happened there. The default mode: commit shows which positions changed on each step - you're watching the commit-front sweep across the canvas as the temperature cools. mode: entropy swaps in per-position predictive entropy instead, so you can see where the model stayed uncertain late into the run. Fair warning on the entropy mode: it's min-max normalized per render, so pixel intensities are only comparable within one image, not across two traces.

Two other things land in the summary string: the avalanche/commit curve (how much of the canvas committed per step, block-local in scope so it resets at canvas boundaries), and a mask-token corroboration verdict. The frames are keyed by absolute noise level - (t, temperature, step_idx) - so traces from different runs stay comparable even if step counts differ.

The inputs

Only three, and two of them are nearly set-and-forget:

  • canvas_trace - from a sampler-class node. Required, obvious.
  • cell_px (6) - nearest-neighbor upscale factor. The raw grid is steps × positions, which is unreadably small; this makes it legible. Leave it.
  • mode - commit (default) or entropy. The one you might flip, and you'll probably stay on commit.

Outputs: heatmap (an IMAGE - drop it into PreviewImage, or save it), and summary (a STRING - read it in a text viewer).

Where people get burned

The single most important caveat from the pack's own docs: the telemetry measures commit dynamics, not provenance. A frozen token isn't necessarily diffusion-computed - it can be emitted one-shot from the model's memorized autoregressive prior, which produces a clean annealing curve while doing no checkable in-canvas work. Read the heatmap as "when did this position settle," never as "this position was genuinely recomputed here." If you specifically need provenance-sensitive runs, that's what the KV-cache injection path (DGemmaEncode/DGemmaDenoise) is for.

There's also a subtle misreading to avoid: committed_fraction is block-local, so it resets toward zero at every 256-token canvas boundary. A sudden dip mid-run isn't the canvas re-melting - it's a new block starting. The summary labels it plainly, but it's the kind of thing that'll make you think the run went wrong when it didn't.

Install

This node ships inside ComfyUI-DiffusionGemma - install the pack once through Manager (search the title) or clone it, then restart ComfyUI. The heavy cost is the loader's ~54 GB bf16 model upstream; DGemmaTrace itself is just analysis over data the sampler already captured, so it's cheap. Start with the pack's p3-trace-annotated.ui.json example graph - it's the Loader → Sampler → Trace flow with note nodes explaining each step, and it teaches the whole chain faster than anything I can write here.

CategoryDiffusionGemma

Inputs (3)

NameTypeDefaultDescription
canvas_traceDGEMMA_CANVAS_TRACEA complete per-step trace from a sampler-class node.
cell_pxINT61–32Nearest-neighbor upscale factor for the heatmap (a raw steps×positions grid is unreadably small).
modeCOMBOcommitHeatmap signal: commit = which positions changed each step; entropy = per-position predictive entropy (normalized per render).

Outputs (2)

NameTypeDescription
heatmapIMAGE
summarySTRING