Nodes/ComfyUI-SuperNodes/🐧 Color Match Luminance
ComfyUI Node

🐧 Color Match Luminance

Kill the color cast a tiled upscale leaves behind

By sonnyboxΒ·Created 11 months agoΒ·Updated 4 days agoΒ· 12
🐧 Color Match Luminance
  • target
  • reference
  • image

Tiled upscaling has a tell: the upscaled result often carries the detail you wanted but a color cast it shouldn't have. Tiles drift, models reinterpret chroma, and you end up with skin that's a shade off and backgrounds that shifted green. Fixing that by hand means masking and grading - or you use this node, which swaps the color information from your original image back onto the upscaled result in one pass.

It's part of the 🐧 SuperNodes pack by SuperCC, and it lives in the pack's Tiling category because that's where it earns its keep: after you've tiled, upscaled, and stitched, this is the cleanup step.

How it works

Two inputs, no knobs:

  • target - the upscaled image (the one with the color you don't trust).
  • reference - the original image (the one with the correct colors).

Mechanically it's a Lab luminance swap, and that's the right tool for the job. Both images are converted from sRGB to Lab - a perceptual color space where L holds lightness and A/B hold chroma. The node then takes L from the target (so it keeps every bit of detail and contrast your upscaler produced) and A/B from the reference (so it gets the original, correct colors), merges them, and converts back to RGB. If the reference isn't the same size as the target it's resized first with bicubic - fine for A/B, which don't need sharpness.

The output is the target's detail wearing the reference's colors.

When you'd reach for it

  • Directly after a tiled upscale that shifted color. This is the intended slot and the README says as much.
  • After any generative upscaler that re-invented the hue while adding detail - a known failure mode in the upscaler family (people have long complained about color drift on specific upscalers).
  • Matching a processed region to its surroundings: upscale/regenerate a crop, then color-match it back onto the original frame.

Install

ComfyUI Manager, search "ComfyUI-SuperNodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/sonnybox/ComfyUI-SuperNodes

Restart ComfyUI. No model downloads. The pack's only extra Python dependency is matplotlib (Sigmas Graph only). This pack is built against ComfyUI's newer extension API - update ComfyUI if the nodes don't appear.

Gotchas

  • It matches chroma only. If your upscaler also shifted brightness or contrast, that stays - this node deliberately keeps the target's L. Run your luminance fix first, then this.
  • It's a global swap, not a selective one. If only one region drifted, this applies the reference's colors everywhere. For a localized fix you'd crop first, match, restore - which, conveniently, the pack's crop-restore nodes can do.
  • Because it takes the reference's colors wholesale, a reference with a cast of its own passes that cast along. Garbage in, garbage out - the reference is your ground truth.

It's two inputs and no settings, which is exactly right. The hardest part is remembering it's there when your upscale comes back looking technically crisper and visually wrong.

CategorySuperNodes/Tiling

Inputs (2)

NameTypeDefaultDescription
targetIMAGEThe upscaled image.
referenceIMAGEThe original image with correct colors.

Outputs (1)

NameTypeDescription
imageIMAGEβ€”