Nodes/ComfyUI Sampling Trace Inspector/Deprecated · Sampling Trace Model
ComfyUI Node

Deprecated · Sampling Trace Model

The Engine of Sampling Trace, Now Safely Behind the Curtain

By ILcrowe·Created about a month ago·Updated 17 days ago· 0
Deprecated · Sampling Trace Model
  • model
  • prompt_trace
  • clip
  • model
  • trace_session
modeadvanced
label
preview_every1
preview_max_side768
preview_formatJPEG
preview_quality85
persist_previewstrue
persist_tensor_statstrue
preview_decoderclear

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 - basic or advanced (default advanced). Advanced captures CFG delta and Control structure; with persist_tensor_stats it also grabs x/x0 details and step-level word attention. Old workflows that say deep silently 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) - clear uses the model-family TAESD when available (closer to final dimensions), falls back to Latent2RGB. fast is 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.

CategorySampling Trace Inspector

Inputs (12)

NameTypeDefaultDescription
modelMODEL
modeCOMBOadvanced2 options: basic, advanced
labelSTRING
preview_everyINT11–100
preview_max_sideINT768128–4096
preview_formatCOMBOJPEG2 options: JPEG, PNG
preview_qualityINT8540–100
persist_previewsBOOLEANtrue
persist_tensor_statsBOOLEANtrue
preview_decoderoptCOMBOclear2 options: clear, fast
prompt_traceoptPROMPT_TRACE
clipoptCLIP

Outputs (2)

NameTypeDescription
modelMODEL
trace_sessionTRACE_SESSION