Nodes/ComfyCollectorNodes/Inspect Tensor (CCN)
ComfyUI Node

Inspect Tensor (CCN)

Find out what's actually inside that wire

By valkymaera·Created 4 months ago·Updated 10 days ago· 1
Inspect Tensor (CCN)
  • data
  • passthrough
  • info
labelTensor

There's a moment every ComfyUI tinkerer hits: you built something clever, it runs without error, and the output is wrong - or empty - and you have no idea which wire lied to you. Inspect Tensor is a diagnostic node for that moment. It takes any value on its data input, dumps a readable summary to your console, and hands the value back out the passthrough socket untouched. You splice it into a wire like an in-line probe, run once, read the report, remove it. No effect on your data at all.

The label input (default "Tensor") is just a tag so that when you've got five of these in a workflow, the console output says which is which. Name them "pos_cond", "ref_latent", "step_4_mask" and the console spew becomes a readable log instead of a wall of numbers.

What you actually get out of it

The report adapts to what it sees:

  • A tensor gets its shape, dtype, device, and min/max/mean/std - the four stats that tell you whether a latent is NaN-poisoned, blanked, or just not what you expected.
  • A dict (like a LATENT, or any node that passes a bundle) gets its keys plus per-key type/shape, so you can confirm a noise_mask survived or find the key you forgot existed.
  • Lists/tuples get length and first-item type; strings get length and a 100-char preview; anything else falls back to a repr.

The summary is also returned as a info string output, so you can pipe it into a display node or a save instead of only trusting the console. But honestly, the console is where it shines - one run, and you know the shape and stats of whatever you're feeding a sampler.

Why this exists

This pack is by an author who builds tinker and debugging tools as a hobby, and Inspect Tensor is squarely in that spirit. The knowledge base's plumbing notes describe the whole class: nodes that "touch no pixels at all" and exist purely to make a graph legible. The wildcard * input is the engine trick that makes it possible - the node accepts anything and then figures out how to describe it. There's no fancy math here; the value is having the tool one right-click away instead of writing a print() debug node yourself.

Install and use

Same pack, same install:

cd ComfyUI/custom_nodes
git clone https://github.com/valkymaera/ComfyCollectorNodes

restart ComfyUI, find Inspect Tensor (CCN) under ComfyCollectorNodes/Utils (or via Manager searching ComfyCollectorNodes). No dependencies beyond the pack.

The honest take

It won't fix your problem, but it'll tell you which wire to blame in about four seconds - and in this ecosystem, that's most of the battle. The one habit worth forming: put the passthrough output back into whatever the input came from, so the probe is truly transparent and you can leave it in place while you iterate. And don't sleep on the debug toggles this pack's other nodes carry - Inspect Tensor gives you the shape of the data, while those give you the internal decisions. Together they're a decent free debugging kit.

CategoryComfyCollectorNodes/Utils

Inputs (2)

NameTypeDefaultDescription
labelSTRINGTensor
dataopt*

Outputs (2)

NameTypeDescription
passthrough*
infoSTRING