Nodes/TrentNodes/Image Batch Analyzer
ComfyUI Node

Image Batch Analyzer

Why Does This Batch Look Off? Here's the Receipt.

By TrentHunter82·Created 9 months ago·Updated 4 days ago· 36
Image Batch Analyzer
  • images
  • analysis_graph
  • statistics_text
analysis_type
graph_width1920
graph_height1080

You've stared at a grid of generated images and known something was wrong without being able to say what. Too dark? Washed out? One channel blown? Your eyeballs aren't the right tool for that - a histogram is. Image Batch Analyzer turns an image batch into actual diagnostics: statistical reports on brightness, contrast, and color, plus rendered charts you can look at, all from one node.

It's a debugging and QC tool more than a generation tool. Reach for it when you're comparing models, tuning a LoRA, checking whether your color-grading pass actually did anything, or verifying a batch of upscaled frames didn't drift. Instead of guessing from a preview, you get numbers and graphs.

How it works

One required input: images (single image or batch). Then analysis_type picks the report flavor:

  • comprehensive - everything: brightness, contrast, and color stats plus charts.
  • statistics - the numeric summary (means, min/max, spread) without the graph.
  • color_distribution - channel-by-channel color composition.
  • bit_depth - analysis of the actual bit depth / value range present, useful when you suspect a batch got silently clipped or quantized.

graph_width and graph_height (default 1920×1080) control the rendered chart size - shrink them if you only need a quick glance, or keep them big for legible distribution curves.

Two outputs:

  • analysis_graph - the rendered chart as an IMAGE, so you can wire it into a preview or save it alongside your batch as a QC record.
  • statistics_text - the numeric report as a STRING, ready to log, dump to a file, or eyeball in a text preview.

Under the hood it leans on matplotlib (a pack requirement), which is why the pack lists it - this is the one node in the set that pulls in charting. For a single image it's instant; for a long batch it's still fast, since the stats are cheap tensor ops and only the graph rendering is matplotlib.

Honest take: this is a niche node. If you're a "just generate, it looked fine" person, it's skippable. If you do QC work - batch upscaling, model comparisons, color calibration, dataset prep - it's the difference between "I think it's darker" and "mean luminance dropped from 0.62 to 0.47 across the batch." It's also the rare node that hands you a record: save the analysis_graph next to the outputs and you've documented what each run actually produced.

Install

Search "Trent Nodes" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes
pip install -r requirements.txt

No model downloads. The one dependency to know about is matplotlib, which the pack's requirements install for this node's charts. Restart ComfyUI after installing. (Manager has been flaky on this pack per the author - an early repo rename left a duplicate registry entry - so manual clone if it misbehaves.)

Common issues

  • Charts are huge or tiny. graph_width/graph_height are your knobs; if you're saving them, pick your deliverable size.
  • "It told me nothing." A single well-exposed image will produce a boring report - that's fine, it means nothing's wrong. The node earns its keep on batches and on images that look off.
  • statistics_text is verbose. That's the comprehensive mode. Switch to statistics for the terser numeric form.

For turning "something looks wrong" into "here's exactly what changed," this is the node. It won't fix the image - it'll tell you what to fix.

CategoryTrent/Image

Inputs (4)

NameTypeDefaultDescription
imagesIMAGE
analysis_typeoptCOMBO4 options: comprehensive, bit_depth, color_distribution, statistics
graph_widthoptINT1920640–3840
graph_heightoptINT1080480–2160

Outputs (2)

NameTypeDescription
analysis_graphIMAGE
statistics_textSTRING