Color Match Image
Fix the color shift a high-denoise pass leaves behind
- images
- reference
- IMAGE
Run img2img at a high denoise, or relight something, or upscale through a second pass, and you'll notice the colors drift - a warmer cast here, a saturation bump there, nothing you asked for. Color Match Image exists to pull that back: give it a reference image with the color you actually want, and it nudges your image toward matching it.
It's the same family of fix that shows up constantly in relighting workflows - IC-Light in particular is notorious for shifting skin tones warm, and the community's standard fix for that is frequency separation: take color/tone from one source and detail from another, merged back together. This node gives you two ways to do that matching, from a crude global nudge to something closer to real frequency separation.
How it works
images(IMAGE) - what you're correcting.reference(IMAGE) - the color you want it to match.blur_type-blurorguidedFilter. This decides how the match is computed.blur_size(default 0, 0–1023) - the key setting. At0, the node matches on the overall mean color of both images - a blunt, whole-image shift. Push it up and both images get blurred by that radius first, so the match happens on regional/low-frequency color rather than a single global average - which is closer to true frequency separation and handles images where color varies across the frame (a face lit from one side, say) far better than a flat mean shift.factor(default 1, -10 to 10) - strength.1applies the full correction; lower values apply it partially; negative values push away from the reference instead of toward it, which is mostly useful for deliberately exaggerating a mismatch rather than fixing one.
Output is a single corrected IMAGE.
blur_type: guidedFilter is the edge-aware option - it respects boundaries in the image while computing the local color average, so you get less bleed across hard edges than plain gaussian blur at the same blur_size. It costs more compute; for most matching jobs plain blur is fine, and you reach for guidedFilter when you're seeing color bleed across a clear edge in the corrected result.
How to install it
ComfyUI Manager: search "ComfyUI-Image-Filters" → install → restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters
then restart. The pack needs opencv-contrib-python; on Windows the author ships install.bat and an import_error_install.bat that wipes conflicting opencv variants and reinstalls the matched set - the same fix on Linux/manual setups is uninstalling stray opencv packages and installing opencv-contrib-python alone. Nothing to download otherwise - no models, negligible VRAM.
Common issues & troubleshooting
Global match (blur_size=0) looks wrong on an unevenly lit image. A mean-color shift can't fix regional color problems - if one side of your subject picked up a color cast and the other didn't, a single global mean will only get you halfway there or overcorrect the side that wasn't wrong. Raise blur_size so the match happens locally instead of as one flat number.
Result looks patchy or blotchy. Usually blur_size too small relative to the features you're matching - you're getting a match radius smaller than the color regions in the image, so neighboring patches get corrected differently and it shows. Push blur_size up until the patchiness smooths out.
Bleed across a hard edge (background color creeping onto the subject, or vice versa). Switch blur_type to guidedFilter - it's built exactly for keeping the local averaging from crossing strong edges.
Fixing IC-Light-style skin-tone shift specifically: this node alone gets you most of the way, but the community's more thorough fix layers this kind of low-frequency color match with a separate high-frequency detail pass from the original (this pack's Restore Detail or Median Filter Image nodes cover that half) - pure color matching won't recover lost fine detail, only tone.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| reference | IMAGE | — | |
| blur_type | COMBO | 2 options: blur, guidedFilter | |
| blur_size | INT | 00–1023 | — |
| factor | FLOAT | 1.00-10–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |