ComfyUI Node
DiffusionGemma Sampler
Drives the denoising loop for one prompt. Six outputs: text, canvas_state, canvas_trace, frames, images, run_config (wire the last four into DGemmaRunLogWriter for a run log, or canvas_trace into DGemmaTrace/DGemmaTokenTrace for analysis). Use DGemmaDenoise instead if you need to condition on a KV-cache.
DiffusionGemma Sampler
- model
- text
- canvas_state
- canvas_trace
- frames
- images
- run_config
◄prompt►
◄seed0►
◄num_inference_steps48►
◄t_min0.40►
◄t_max0.80►
◄entropy_bound0.100►
◄confidence0.005►
◄gen_length256►
◄thinkingfalse►
CategoryDiffusionGemma
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | DGEMMA_MODEL | Loaded DiffusionGemma model (from DGemmaLoader). | |
| prompt | STRING | The user turn to generate a response to. | |
| seed | INT | 00–18446744073709550000 | RNG seed for the generator driving canvas initialization/renoise (a plain integer, not unit-bearing). Omit/leave unset for a nondeterministic run. |
| num_inference_steps | INT | 481–1024 | Requested denoising step budget N (a plain count, not a physical unit) — the schedule-position denominator: t = (N - step_idx)/N. |
| t_min | FLOAT | 0.400–1 | Cold end of the temperature anneal (dimensionless, applied as the divisor T in softmax(z/T)). Despite the lowercase-t name this is a TEMPERATURE, not a schedule position — t bottoms out at 1/num_inference_steps, so t_min itself is a virtual endpoint no step actually reaches. T = t_min + (t_max - t_min) * t, t decreasing 1 -> 1/num_inference_steps across the run. |
| t_max | FLOAT | 0.800–1 | Hot end of the temperature anneal (dimensionless, same softmax(z/T) divisor as t_min) — the temperature applied at the very first step, where the schedule position t == 1. |
| entropy_bound | FLOAT | 0.1000–1 | Per-step joint acceptance budget, in NATS (natural-log entropy, matching torch.distributions.Categorical.entropy() — not bits). A position commits this step only once its acceptance entropy clears this bound. Default 0.1 nats; for scale, the uniform-vocab noise draw's 18 bits/position is ~12.48 nats. |
| confidence | FLOAT | 0.0050–1 | Early-stop threshold: a dimensionless probability the pipeline's adaptive-stop check compares a candidate's confidence against. |
| gen_length | INT | 2561–8192 | Canvas length in tokens (a token count) — how many positions the denoising loop allocates for the generated turn. This is split into blocks of DEFAULT_GEN_LENGTH (256) tokens each: gen_length is processed as ceil(gen_length / 256) blocks, each denoised over num_inference_steps substeps (e.g. gen_length 1024 -> 4 blocks, each denoised over num_inference_steps steps). Larger gen_length costs proportionally more block passes. |
| thinking | BOOLEAN | false | EXPERIMENTAL boolean toggle: injects the <|think|> control token via a system turn. Structurally one token short of native enable_thinking=True (the chat template's `| trim` eats the newline after <|think|>) — see run_diffusion's own docstring for the honest gap. Behavioral impact unverified pending an E2E thinking-mode run on real weights. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| canvas_state | DGEMMA_CANVAS_STATE | — |
| canvas_trace | DGEMMA_CANVAS_TRACE | — |
| frames | STRING | — |
| images | IMAGE | — |
| run_config | DGEMMA_RUN_CONFIG | — |