Histogram
A real histogram for grading
- image
- scope
Grading by eye is how you end up with images that look great on your monitor and are secretly clipping to pure white or black everywhere. Colorists don't grade by eye - they grade with scopes, and the histogram is the first one you learn. Base ComfyUI ships neither a histogram nor any other scope, which is a weird omission for a tool that's built around visual work. Histogram is the Darkroom pack's fix: a proper, configurable histogram node whose output is a regular image you can wire anywhere.
What it shows you
The histogram plots how many pixels sit at each brightness level, from black (left) to white (right). Reading it is a skill that pays off fast:
- Pixels piled against the left wall - crushed blacks. Detail is being lost.
- Pixels piled against the right wall - blown highlights. Same problem at the top.
- A gap in the middle - a tonal hole, usually the sign of a low-contrast or over-processed image.
- A smooth mountain shape - a healthy, well-exposed image.
The node draws a 0/25/50/75/100% graticule (the vertical grid lines at standard tonal markers) and, nice touch, clip-warning stripes on the edges - visual flags right where clipping happens. You can spot a blown-out sky at a glance instead of squinting at the image.
The controls
mode- RGB (all three channels overlaid), Luma (Rec.709 luminance - the one that matches perceived brightness), or a single channel (R/G/B). RGB overlay is the default and the most informative for grading; single-channel is great for diagnosing a channel-specific cast.width/height- the scope's output size, up to 2048×1024. Larger is easier to read; 512×256 is plenty for a working preview.log_scale- log-scale the counts. The tooltip says it plainly: "useful when highlights swamp midtones." In a normal histogram a huge sky region can dwarf everything else; log scaling makes the low-count midtones visible. Turn it on when the histogram looks like one giant spike.
The important detail: output is IMAGE
Here's the ComfyUI-specific bit: this node outputs scope as a regular IMAGE, not some special overlay or debug widget. That means you wire it straight into a PreviewImage node, or even Save Image if you want to capture it. It also means you can route it through other image nodes if you're feeling creative. The output is a rendered scope image - the pack's Vectorscope works the same way.
How to use it in a grade
The workflow is: Histogram → PreviewImage next to your main preview, then adjust Exposure & Tone and watch the histogram respond. You're not matching a "correct" shape - you're checking that your endpoints are where you want them (whites not clipped unless you intend it, blacks not crushed) and that your contrast changes actually distribute tone instead of piling it up. Check it again before you save; the histogram is the last line of defense against shipping a clipped file.
Installing it
Part of the full ComfyUI-Darkroom pack:
cd ComfyUI/custom_nodes
git clone https://github.com/jeremieLouvaert/ComfyUI-Darkroom.git
pip install -r ComfyUI-Darkroom/requirements.txt
Or search "Darkroom" in ComfyUI Manager. Needs scipy, opensimplex, rawpy, exifread, Pillow - the scope rendering itself uses PIL. Restart and it's under AKURATE/Darkroom/Scopes. No GPU, no models, no API.
It won't win any flashy awards, but a real histogram is the single highest-value tool for learning to grade properly, and this is the cleanest one in ComfyUI.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mode | COMBO | RGB | RGB = overlaid channels. Luma = Rec.709 luminance. R/G/B = single channel. |
| width | INT | 512128–2048 | Scope width in pixels |
| height | INT | 25696–1024 | Scope height in pixels |
| log_scale | BOOLEAN | false | Log-scale the counts (useful when highlights swamp midtones) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| scope | IMAGE | — |