Image Color Match
Steal another image's color grading with ten different algorithms
- image_target
- image_ref
- IMAGE
Nifty Image Color Match transfers the color distribution of a reference image onto a target - no model, no training, no prompt. Point image_ref at the photo whose look you love, feed image_target whatever you generated, and the node makes the target's colors statistically resemble the reference's. It's the color-grading cousin of everything the photorealism crowd obsesses over, and it runs in seconds.
The headline feature is the ten transfer methods, which differ in how aggressively and how smartly they move color around:
- mkl - Monge-Kantorovich linear map. Best overall quality, the recommended default. Start here.
- reinhard_lab - fast statistical match in LAB space, great for natural/photographic content. CPU-only.
- reinhard_lab_gpu - same, GPU-accelerated. Requires the
korniapackage; prefer it over the CPU version if you've got kornia installed. - wavelet / adain - structure-preserving. They move low-frequency color and leave texture and fine detail alone, so they're the pick when you must not smear detail.
- hm - histogram matching. Fast, broad tonal correction, less precise on complex palettes.
- reinhard - the classic RGB Reinhard. Quick and simple, struggles with complex distributions.
- mvgd, hm-mvgd-hm, hm-mkl-hm - the heavy statistical hitters from the
color-matcherpackage, best for tricky distributions.hm-mkl-hmis the highest-quality combo of the lot. These requirecolor-matcher.
The inputs that matter
- image_target - whose colors get changed.
- image_ref - whose colors you're stealing.
- enabled - off =
image_targetpasses through untouched. - method - the algorithm above. Default
mkl. - transfer_mode -
all(full transfer),color(hue/chroma only, keep the target's luminance), orluminance(brightness only, keep the colors). - strength - blend amount, 0–10.
1.0= full match,0.5= halfway between original and matched, above1.0exaggerates. - multithread - process batch frames on parallel CPU threads. On by default and the right call for big batches.
Output: IMAGE - the matched batch. Returns None if either image input is disconnected.
Gotchas, honestly
Two things bite people. First, the fancy methods are not built in: mvgd and the combos need color-matcher, and reinhard_lab_gpu needs kornia. If they're missing, the node raises an ImportError telling you to pip install them - install both up front and you won't think about it again:
pip install color-matcher kornia
Second, this is a statistical transfer, not a style transfer. If the reference has a strong cast (orange teal, heavy contrast), the target will inherit the distribution, and with strength above 1.0 it'll overshoot into "fake" territory fast. The transfer_mode tricks - matching only luminance, or only hue - are how you get believable results instead of a target that looks recolored. For batch work, reference frames are matched by index (the ref cycles at its own batch size), so a single ref image works against a whole video's worth of frames.
Install
The pack itself: ComfyUI Manager → search "Nifty Nodes", or
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
Restart ComfyUI, keep ComfyUI current (v3 API). color-matcher and imageio-ffmpeg come with the pack; add kornia for the GPU reinhard method. This is one of the pack's most capable image tools - for a "keep the detail, steal the mood" look, the wavelet method alone is worth the install.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | true | When disabled, image_target is passed through unchanged. |
| method | COMBO | mkl | Color transfer algorithm. 'wavelet' and 'adain' = structure-preserving, good for textures. 'reinhard_lab' = fast statistical match in LAB space. 'mkl' = accurate linear color mapping (recommended default). 'hm' = histogram matching. 'reinhard_lab_gpu' = GPU-accelerated reinhard (requires kornia). 'mvgd', 'hm-mvgd-hm', 'hm-mkl-hm' = advanced methods from color-matcher package. |
| transfer_mode | COMBO | all | 'all' = transfer full color. 'color' = transfer only hue/chroma, keep original luminance. 'luminance' = transfer only brightness, keep original colors. |
| strength | FLOAT | 1.000–10 | Blend strength of the color transfer. 1.0 = full match, 0.5 = half-way blend with original, values above 1.0 exaggerate the effect. |
| multithread | BOOLEAN | true | Process batch images in parallel using multiple CPU threads. Recommended for large batches. |
| image_targetopt | IMAGE | The image whose colors will be adjusted to match the reference. | |
| image_refopt | IMAGE | The reference image whose color distribution is used as the target. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |