DiffusionGemma Token Trace
Raw token IDs, no tokenizer — the debug node for DiffusionGemma's plumbing
- canvas_trace
- token_report
DGemmaTokenTrace is the pack's debug node, and it's honest about being one. Where DGemmaTrace gives you a readable heatmap and the sampler gives you clean text, this node shows you the raw integer token IDs - the pre-excision final canvas and a per-step token-id grid. No decoded text, no tokenizer, no pretty picture. If you've ever wanted to peek at the actual numbers moving around the canvas, this is the node.
Reach for it when text-level views are hiding something. The sampler's text output is deliberately excised - the thought-channel frame is stripped at the id level so it never leaks into your answer. DGemmaTokenTrace is the way to check what was actually on the canvas before that excision, which matters for debugging things like the <|think|> channel or verifying that raw ids really did commit where the heatmap said they did.
How it works
It takes a single canvas_trace from a sampler-class node and renders two things as a STRING report:
raw_canvas_ids- the final, pre-excision token-id sequence from the end of the run.- A per-step token-id grid - one row per frame, labeled with
canvas_idx,step_idx,t, andtemperature, so you can trace exactly which integer went where as the anneal cooled.
The report deliberately shows integer ids, not words - the node has no tokenizer and doesn't want one (that would mean carrying a whole model processor just for display). If you need decoded text, DGemmaTrace and the sampler's frames output are the paths for that.
One output only: token_report (STRING). Read it in a text-viewer node; it's formatted to be readable as-is, with the scheduler and config on the first line.
The one caveat
raw_canvas_ids is an additive-optional field - a legacy or no-capture trace simply won't have it. The report says raw_canvas_ids: not captured honestly instead of rendering an empty sequence, so don't read "not captured" as a bug in your run; it means the trace predates the field.
Install
It's part of the ComfyUI-DiffusionGemma pack - one install, all nodes. Manager search "ComfyUI-DiffusionGemma" or git clone into custom_nodes, restart, transformers==5.13.0 + diffusers>=0.39.0. Then wire a sampler's canvas_trace in and read the report. There's a reason this is the last node in the pack you'll use for anything normal - it's for the days when the clean views are lying to you.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| canvas_trace | DGEMMA_CANVAS_TRACE | A complete per-step trace from a sampler-class node. Rendered as raw integer token ids, not decoded text. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| token_report | STRING | — |