Image Stats Probe (C2C)
Why is your generation black? Image Stats Probe (C2C) tells you in one run
- images
- images
- report
- mean
- std
- bright_pct
Image Stats Probe (C2C) is a diagnostic that answers the most annoying question in ComfyUI: is my output actually broken, or am I imagining it? You get a black frame back, or everything's blown out white, and you can't tell whether the sampler failed, the VAE misbehaved, or the tensor is fine and just needs a different preview. This node sits in the middle of your graph, passes the image through untouched, and prints what it actually is: shape, dtype, mean, std, min, max, and the percentage of pixels brighter than 0.95.
It's one of the small utility nodes in ComfyUI-CustomNodePacks, the ~72-node umbrella pack from Code2Collapse (Likhith-24, active on r/comfyui). The C2C Helpers category is the author's own toolbox for debugging workflows - and honestly, this is the one you'll keep wired in out of laziness, because it costs nothing and saves you a lot of staring.
How it works
Pure tensor math, zero models, zero VRAM. It computes:
- mean - if your "image" has a mean of 0.0001, it's black. A mean of 1.0, it's white. A mean around 0.5 with high std, it's a real image.
- std - the giveaway. A low std (like 0.01) means there's no contrast anywhere; something upstream collapsed the dynamic range.
- min/max - tells you if you're clipped. If min is exactly 0 or max exactly 1, you've lost data at one end.
- bright_pct - the share of pixels above 0.95, as a float. Over 50% and your highlights are toast.
The report string is human-readable for the log; the separate mean, std, and bright_pct outputs are real numbers you can wire into routing logic - e.g. a Switch that picks a different path when mean drops below a threshold. And because it's a passthrough (images in → images out unchanged), you can drop it anywhere without breaking the graph.
The inputs and outputs that matter
images- in and out. Only input, and it comes back identical on the first output.report(STRING) - the whole story in one line, logged to the console too.mean/std/bright_pct(FLOAT) - the numbers, if you want to act on them.
Installing it
This ships with ComfyUI-CustomNodePacks - there's no separate repo. Manager → search "CustomNodePacks", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git
It needs nothing beyond what ComfyUI already has (it's a torch mean/std on a tensor). The pack as a whole wants opencv-python>=4.7.0 and scipy>=1.10.0 - install just those if missing, not the full requirements.txt, which can clobber ComfyUI's torch. Restart ComfyUI.
Common issues
- The node reports a shape that's not what you expected - that's the whole point. If
shape=(1, 8, 64, 64)where you expected a big RGB image, you're feeding it a latent, not an image. That's your bug, found in seconds. - Mean is fine but the output still looks wrong - mean/std are global; they won't catch a region-specific problem. For that you'd want a per-region check, but this node is the right first probe to rule out the whole-frame failure modes.
- Bright_pct hovering near 100% - you're clipped. Fix the upstream exposure/gain before wasting a sampler run.
The honest verdict: it's a boring node that does one trivial thing, and that's exactly why you'll keep it. When something's broken, a number beats a vibe.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| report | STRING | — |
| mean | FLOAT | — |
| std | FLOAT | — |
| bright_pct | FLOAT | — |