Color Match 2Refs
Matching a Look Between Two Moods
- image_ref_a
- image_ref_b
- image_target
- image
The one-ref problem
The standard color-match node you'll find in most ComfyUI packs takes one reference and forces your whole image toward it. That's fine until the look you actually want isn't either reference - it's somewhere between two of them. Maybe you have a target frame that needs the warmth of shot A with a hint of the teal in shot B, or you're grading a batch of frames to sit halfway between two established looks. That's the gap this node fills.
Color Match 2Refs matches your target to reference A, matches it again to reference B, and then blends the two matched results with a weight you control. The pack is small - the author describes it as "vibe coded" - but this one node answers a question people have been asking in the ComfyUI community for a while: how do you color-correct against a reference pair instead of a single reference?
How it works
Under the hood it's the color-matcher Python library doing the heavy lifting, with a straightforward blend on top:
matched_A= transfer(target, ref_A, method)matched_B= transfer(target, ref_B, method)blended=weight_a× matched_A + (1 −weight_a) × matched_B- output = target +
strength× (blended − target)
The method dropdown is the library's algorithm selection, defaulting to mkl (Monge-Kantorovitch linear transfer, the well-behaved general-purpose default). hm is plain histogram matching, reinhard is a mean/std statistical transfer, mvgd is a multivariate Gaussian fit, and the chained hm-mvgd-hm / hm-mkl-hm versions stack a histogram pass on top. For most jobs mkl is where you want to start; the chained ones tend to be more aggressive.
One thing worth knowing: everything runs on CPU via numpy, and when your target is a batch it's processed in parallel with a thread pool (that's the multithread toggle). No GPU, no model files.
The inputs that actually matter
The required set is tiny:
- image_ref_a / image_ref_b - your two reference looks. Either can be a single image and it'll be reused for every target frame.
- image_target - what gets matched.
- weight_a - the blend between the two matched results. B always gets
1 - weight_a, so 0.5 is a perfect 50/50, 0.8 leans hard toward A. - method - the transfer algorithm described above.
The two optional inputs are strength (how hard to pull the target toward the blend) and multithread. strength defaults to 1 but goes up to 10 - cranking it past 1 overshoots, which can push saturation and blow out highlights. That's sometimes a fun look, but start at 1.
The output is a single image tensor, same shape as your target, ready to wire into a VAE decode or a video frame save.
Installing it
Both nodes in this pack ship together, so you get this one for free:
- ComfyUI Manager → search "Comfyui-ColorMatchNodes" → install.
- Or manually:
cd ComfyUI/custom_nodes && git clone https://github.com/elyetis/Comfyui-ColorMatchNodesthen restart ComfyUI.
It needs color-matcher (plus numpy, which you already have). Manager installs the requirements automatically; if you cloned manually, run pip install color-matcher in your ComfyUI Python environment.
Common gotchas
The failure you're most likely to hit is the node throwing "Can't import color-matcher" - that's the pip dependency missing, usually because Manager's dependency install failed silently. Reinstall it and restart.
Beyond that, the usual traps are expectations: weight_b is never a free input, strength above 1 overshoots rather than saturating, and for long batches the CPU color transfer gets slow - if you're matching hundreds of frames, the auto-weights sibling node in this pack is the one designed for that job.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image_ref_a | IMAGE | — | |
| image_ref_b | IMAGE | — | |
| image_target | IMAGE | — | |
| method | COMBO | mkl | 6 options: mkl, hm, reinhard, mvgd, hm-mvgd-hm, hm-mkl-hm |
| weight_a | FLOAT | 0.500–1 | — |
| strengthopt | FLOAT | 1.000–10 | — |
| multithreadopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |