Deprecated · Sampling Trace Model
The Engine of Sampling Trace, Now Safely Behind the Curtain
- model
- prompt_trace
- clip
- model
- trace_session
This is where the actual sampling trace happens. Sampling Trace Model is the deprecated split-workflow node that clones your MODEL, straps on the observers, and hands back a trace_session - but in the current 0.4.0 release it's hidden from normal search, and the newer Sampling Trace · One Node Setup calls it for you. So why read about a node you'll never search for? Because if you're debugging an old workflow that still contains one, or you want fine control the one-node setup doesn't give you, this is the control panel you need.
It does exactly one big thing well: it clones the ModelPatcher, installs tracing wrappers on the clone, and passes the clone back out. Your KSampler never moves. The wrappers hook outer_sample (sampling begin/end plus a step callback around your existing callback), apply_model (ControlNet residuals and active transformer patch types), and a pre-CFG hook (conditional vs. unconditional output difference). Per the author's README, any sampler on the standard CFGGuider → ModelPatcher path becomes observable without replacing it.
Inputs that matter
This node has more knobs than the one-node setup, and most are about cost:
- mode -
basicoradvanced(defaultadvanced). Advanced captures CFG delta and Control structure; withpersist_tensor_statsit also grabs x/x0 details and step-level word attention. Old workflows that saydeepsilently normalize to advanced. - preview_every (default 1) - 1 = a preview every step, 2 = every second step. Numeric step records are always captured; only the filmstrip thins out.
- preview_max_side (default 768) - longest side of stored previews.
- preview_decoder (
clear/fast) -clearuses the model-family TAESD when available (closer to final dimensions), falls back to Latent2RGB.fastis always Latent2RGB: faster, but upscaled latent resolution shows. - persist_previews (default true) - flip off to save numeric traces without image files.
- persist_tensor_stats (default true) - this is the expensive one. Advanced + this on is where the full internal-signal view comes from.
- label - free text so you can tell segments apart in the panel.
Optional inputs: prompt_trace (accepts a PROMPT_TRACE from the deprecated CLIP node) and a clip input the author now marks "legacy - don't connect new." Outputs are the cloned model and the trace_session you'd wire into Export/Note nodes in old graphs.
Install and gotchas
Same pack as the rest of Sampling Trace Inspector - ComfyUI Manager (search "Sampling Trace") or:
git clone https://github.com/ILcrowe/ComfyUI-SamplingTrace-Inspector.git ComfyUI/custom_nodes/ComfyUI-SamplingTrace-Inspector
No third-party dependencies, no model downloads, restart after install.
The traps are mostly about cost and placement. It defaults to advanced with tensor stats on - fine for a debug run, wasteful for casual generation, so flip to basic unless you need the depth. Place it after the last MODEL patch so the snapshot includes your LoRA and IPAdapter. And remember the design promise: if hook installation ever fails, the node records the error and passes the original model through - a trace bug should never break your generation. It's a genuinely careful piece of engineering for a tool this young.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| mode | COMBO | advanced | 2 options: basic, advanced |
| label | STRING | — | |
| preview_every | INT | 11–100 | — |
| preview_max_side | INT | 768128–4096 | — |
| preview_format | COMBO | JPEG | 2 options: JPEG, PNG |
| preview_quality | INT | 8540–100 | — |
| persist_previews | BOOLEAN | true | — |
| persist_tensor_stats | BOOLEAN | true | — |
| preview_decoderopt | COMBO | clear | 2 options: clear, fast |
| prompt_traceopt | PROMPT_TRACE | — | |
| clipopt | CLIP | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| trace_session | TRACE_SESSION | — |