Color Matching Ops (live-preview)
Make any image borrow another image's color grade in one shot
- image
- reference
- image
ColorMatchingNode takes one image and re-grades it so its color statistics match a second "reference" image - no prompt, no model, no API call. You feed it a photo you like and it pulls the grade across to your render. It's the kind of node that sounds like it should need a deep-learning model and quietly doesn't.
The use case that keeps bringing people back: consistency. Generate a batch, pick the one image that nailed the mood, then run every other frame through this node to give them the same grade. Same trick works on img2img edits that drift warm - the community's standing fix for Flux's reproducible warm color shift on edits is exactly this, histogram/color matching back against the source. When your model decides your output should be 200 Kelvin warmer than your input, this is the reset button.
How it works
It's pure statistics - no ML anywhere in the chain. That's also why your two inputs can be any size and the node doesn't care. The README calls it out: matching is statistics-only, so there's no resizing step.
You pick a method:
- LAB (default) - mean/std transfer, the classic Reinhard-style technique, but computed in the perceptual Oklab space instead of plain Lab. Because Oklab is closer to how humans judge color differences, the result tends to look like a deliberate grade rather than a "stretched histogram" mess.
- RGB - the same mean/std trick done per RGB channel directly. Faster, cruder, occasionally useful for a harsher look.
- Histogram - per-channel cumulative-distribution matching. This one really does reshape the brightness curve of the output to mirror the reference, so it's the strongest method - and the most likely to band on smooth gradients, since it works on 256 levels per channel.
target decides what you keep, and the split always happens in Oklab so it behaves the same regardless of method. All gives you the full match. Lightness copies the reference's tonality but keeps your original colors - think "match the exposure and contrast, not the mood." Color is the reverse: it transfers the reference's color grade while your image keeps its own brightness. That split is genuinely useful, and it's the reason to reach for this node over a flat "match everything."
The inputs that matter
Honestly, there are four and you'll set two of them. image and reference are required - the reference can come from any Load Image node, or from a VAE-decode upstream if you want to match a generated target. Then method (LAB is the safe default) and target (All, unless you know why you want the split).
The output is a single image you can wire straight into a Save Image, into a VAE encode for another pass, or into a comparison grid.
One honest caveat before you fall in love: this is a statistics transfer, not a color-management pipeline. It will drag the overall mood and tone of the reference onto your image, but it won't reproduce a branded look the way a LUT does - there's no per-channel curve to tune. If you need print-grade matching, look at a color-management pack. If you need "make this batch feel like that hero frame," this is the one.
Installing
It ships in the ComfyUI Channel Ops pack, which adds four nodes at once - this one, Channel Ops, Layer Blending Ops, and Filter Ops. Easiest route:
- ComfyUI Manager → Install Custom Nodes → search "ComfyUI Channel Ops" → install → restart ComfyUI.
- Or by hand:
cd ComfyUI/custom_nodes && git clone https://github.com/L33chKing/ComfyUI_Channel_Opsthen restart.
No models to download, no extra pip dependencies - the pack is plain PyTorch/NumPy/PIL, so it works on CPU or GPU and won't start a dependency war with the rest of your custom_nodes. It's MIT licensed.
Gotchas
- The live preview is real: the node saves a downscaled copy of your inputs and renders the match in-node so you can flip between LAB / RGB / Histogram without re-running the graph. Worth knowing it renders the preview at higher resolution than the pack's other nodes (1024 vs 512) deliberately - downscaling smooths the image and skews mean/std, so the author bumped the preview size to keep it honest.
- Histogram method can posterize smooth gradients; if you see banding, drop back to LAB.
- If your reference is drastically brighter or darker than your source, the Lightness transfer will happily lift or crush the output - that's the method working as designed, not a bug.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference | IMAGE | — | |
| method | COMBO | LAB | 3 options: LAB, RGB, Histogram |
| target | COMBO | All | 3 options: All, Lightness, Color |
| preview_idopt | STRING | A | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |