HT Levels
Steal one image's color grade and apply it to another
- source_image
- reference_image
- processed_image
"Match this image's look" is one of the most common requests in image work, and it usually means hours of fiddling with curves by eye. HT Levels automates the boring part: give it a source_image and a reference_image, and it re-grades the source to match the reference's tonal distribution. It's the color-matching node you reach for when you've rendered something that's technically correct but looks nothing like your mood board.
How it works
Two methods, chosen by the method dropdown:
histogram_match(default) - the classic technique. The node computes a histogram and a cumulative distribution function (CDF) for each color channel of both images, then maps every source pixel value so the source's CDF lines up with the reference's. Roughly: "if 40% of the reference pixels are darker than value X, make 40% of the source pixels darker than X too." Per-channel, which is why it can shift color cast as well as contrast.luminance_curve- matches on the luminance/lightness channel instead, adjusting tone and contrast while leaving the source's color relations mostly alone. Use this when you want the reference's brightness structure but not its color.
strength (0 to 2, default 1) blends the result - 1.0 is a full match, 0.5 a half-hearted nudge toward the reference, and above 1 you get a push past it. That's the dial to babysit, because a full histogram match on wildly different images can produce a posterized or oversaturated mess; starting at 0.5 and raising it is the sane workflow.
The single output, processed_image, drops straight into a preview or save node.
When you'd use it
- Series consistency: you generated a batch at different times/settings and want them to share one grade. Pick the best one as reference, match the rest.
- Mood-board matching: reference is a photo or a film still; source is your render. Nudge strength down if it fights the render.
- Fixing flat renders: use a punchier reference just to pull contrast out of a muddy image.
It operates per-image on the whole frame - there's no masking, so a reference with a very different subject/sky split will bleed its grade across everything. That's fine for tonal matching; it's why the KB's general advice on color work still applies: the more similar the two images' structure, the better the match.
Installing
Standard pack install - Manager → "HommageTools for ComfyUI", or:
cd ComfyUI/custom_nodes
git clone https://github.com/ArtHommage/HommageTools.git
cd HommageTools && pip install -r requirements.txt
restart. Pure PyTorch tensor math (histograms and CDFs in BHWC), no model files, no extra dependencies.
The honest take
This is a solid, unglamorous utility - it's not going to beat a skilled colorist with a curve tool, but it will beat doing nothing, and it's repeatable inside a graph in a way manual grading isn't. Where people get burned: expecting a full look transfer (lighting, atmosphere, lens characteristics). It matches tonal distribution, which is the foundation of a grade, not the whole grade. Treat it as the starting point that gets you 80% of the way, then finish the last 20% with HT Image Adjuster or an editor. And per the pack's alpha disclaimer, don't be shocked if histogram binning details shift in a later version.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| source_image | IMAGE | — | |
| reference_image | IMAGE | — | |
| method | COMBO | histogram_match | 2 options: histogram_match, luminance_curve |
| strength | FLOAT | 1.00–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| processed_image | IMAGE | — |