Nodes/ComfyUI/Image Histogram
ComfyUI Node Runs on cloud

Image Histogram

See an image's tonality as data — 256 bins of light, per channel and overall

By Comfy-Org·Created 4 years ago·Updated 20 days ago· 121,575
Image Histogram
  • image
  • rgb
  • luminance
  • red
  • green
  • blue

If your image is washed out or crushed to black, you don't need to squint at it - you need numbers. Image Histogram is the node that turns an image into those numbers: it counts how many pixels sit at each brightness level, from 0 to 255, and hands you the distribution. It's the tonality readout ComfyUI was missing, and it ships with core - no install, and it's new in 2026.

This is a diagnostics node first and a creative node second. It won't fix a flat image; it tells you why it's flat. If you've ever argued with a VAE decode that came out grey or washed out, this is the node that gives you the evidence.

How it works

It takes your image tensor, converts it to 0–255 integer values, and runs a histogram count on each color channel - a bin for every one of the 256 possible levels. Then it does two composite views:

  • rgb - the average of the red, green, and blue histograms, the same "RGB composite" readout you'd get in Photoshop. It tells you the overall tonal spread.
  • luminance - brightness weighted the way human vision actually works, using the ITU-R BT.709 coefficients: roughly 0.21 red + 0.72 green + 0.07 blue. Green dominates because that's genuinely how your eye sees.

Plus the raw per-channel histograms: red, green, blue, if you need to diagnose a color cast channel by channel.

Inputs and outputs

One input, image - any image tensor. Five outputs, all HISTOGRAM type: rgb, luminance, red, green, blue. Each is a list of 256 counts.

The intended partner is the Curve Editor, which accepts a histogram as an optional input and overlays it while you shape a curve. That pairing turns "is this image too dark" from a guess into a curve sitting on top of real data.

Where people get burned

First and most important: it reads the first frame of a batch. Feed it a 32-frame video and you're looking at frame 0, not the whole clip. For video tonality you'd want to histogram individual frames or a different approach - don't assume the readout covers everything you connected.

Second: the values are raw pixel counts, so a large image has big numbers and a small image has small ones. Two images aren't comparable by raw bin height unless they're the same dimensions. For comparing relative shape - "is there a spike at 255" - that's fine; for absolute comparison, normalize in your head or resize first.

Third: histograms tell you about distribution, not quality. A perfectly exposed, beautiful image can have a narrow histogram if it's low-contrast, and a terrible image can have a wide one. Use the shape to diagnose (crushed blacks spike at 0, blown highlights spike at 255, a grey cast sits clustered in the middle), then fix the actual cause. The tool is honest; the interpretation is on you.

Categoryutilities

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (5)

NameTypeDescription
rgbHISTOGRAM
luminanceHISTOGRAM
redHISTOGRAM
greenHISTOGRAM
blueHISTOGRAM