Color Match
Steal the color grading of one image and give it to another
- image
- image_ref
- image
Color Match transfers the color palette of a reference image onto a target image - the classic color-grading task that the post-processing layer keeps rediscovering. It's a port of KJNodes' ColorMatchV2 (reordered so the target image is the first input, which matters when you bypass the node: it passes the correct image through). If you've ever generated an image and thought "the colors are off," this is the honest alternative to re-rolling the generation: a statistics transfer is deterministic and instant, a re-gen is neither.
The three jobs this was made for: making an inpainted or outpainted region agree with the original, making an upscaled tile match its neighbors, and seating a composited subject into a new background's light.
How it works
Eclipse's version is unusually method-rich, and the method you pick is the whole ballgame:
- CPU methods (via the
color-matcherlibrary):mkl,hm,reinhard,mvgd,hm-mvgd-hm,hm-mkl-hm. These are the classic mean/variance and histogram-transfer algorithms, run per-frame on the CPU. Inputs are normalized to finite RGB values first for numerical stability, and if a result comes back invalid the node falls back to the target image rather than poisoning your batch. - GPU
reinhard_lab_gpu(Kornia): the Reinhard mean/std transfer done in LAB space on the GPU. - GPU
wavelet(Haar wavelet, LAB): decomposes both images, matches the low-frequency color band's statistics, and keeps the target's detail bands - so it preserves texture while transplanting color. This is the one to pick when you want the palette without the blur. - GPU
scattersort(exact histogram matching): sorts each channel and maps rank positions, producing an exact per-channel color distribution match. The most "total" of the bunch.
strength blends the result (0 = no change, 1 = full transfer, up to 10). multithread parallelizes CPU batch work; per_frame processes one frame at a time to cap VRAM on big batches.
The inputs that matter
image- the target (the one being recolored). Passes through on bypass.image_ref- the reference whose colors get transferred.method- defaults tomkl; switch towaveletfor detail-preserving,scattersortfor exact matching.strength- the blend amount.- Output -
image, the matched result.
Watch the hidden dependencies
Here's where people get burned. The CPU methods need the color-matcher package, and the Kornia GPU methods need kornia - and neither is in the pack's requirements.txt. If you pick mkl (the default!) on a fresh install, you may hit an ImportError that tells you exactly what to do:
pip install color-matcher # for mkl / hm / reinhard / mvgd / hm-* CPU methods
pip install kornia # for reinhard_lab_gpu and wavelet
scattersort is pure torch and needs neither. Install the missing package into the same Python that runs ComfyUI (for portable installs, python_embeded\python.exe -m pip install …).
Installing the node
Part of ComfyUI_Eclipse, installed once:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse
Restart ComfyUI (or ComfyUI Manager → search "ComfyUI Eclipse").
Gotchas
Pack-wide: ComfyUI_Eclipse was formerly RvTools, and v4.0.0 removed all legacy nodes - old workflows need the Workflow Migration Tool node (or python tools/migrate_workflow.py <workflow.json>) to rewrite old IDs with a backup. And remember: if a frame's color transfer produces invalid values, the node silently returns the original target for that frame - so a partially-unmatched result usually means the reference was degenerate (flat color, all-black), not that the node failed.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Target image to apply color grading to. Passes through on bypass. | |
| image_ref | IMAGE | Reference image whose colors will be transferred. | |
| method | COMBO | mkl | Color transfer algorithm. wavelet = Haar wavelet LAB transfer (preserves detail). scattersort = exact histogram matching per channel. CPU methods normalize non-finite or out-of-range RGB inputs for numerical stability. |
| strength | FLOAT | 1.000–10 | Blend strength. 0 = no change, 1 = full transfer. |
| multithread | BOOLEAN | true | Use multithreading for batch processing. |
| per_frame | BOOLEAN | false | Process each frame independently instead of the whole batch at once. Caps VRAM usage to one frame at a time for GPU methods; slightly slower but avoids out-of-memory errors on large batches. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |