DLSS5 Color Matcher
The two-second fix for a neural render's color drift
- Source Image
- Reference Image
- matched_image
Why this one exists
Feed a frame through a neural reconstruction pass and the colors move. Not dramatically - a nudge in white balance, a hint more magenta in the shadows, skin that comes back a half-stop warm. It's the drift you get after any heavy upscale or restyle, and the correct answer has always been the boring one: match the result's statistics back to the reference instead of re-rolling the generation.
That's exactly what this node is. It's the only node in the pack that touches no CLI at all - no VE_CLI.exe, no preset JSON, nothing NVIDIA-specific. Pure image math, and it'll happily run on a machine that hasn't downloaded the runtime.
The intended pairing is: Enhance (Image) output goes into Source Image, the untouched original goes into Reference Image, and the matched result goes to your save node. Two seconds of CPU work versus another full neural pass and hoping the drift goes the other way.
How it works
It's a Reinhard color transfer in Lab space, via scikit-image. Per channel, it computes the mean and standard deviation of the source and of the reference, then remaps the source as (x - src_mean) * (ref_std / src_std) + ref_mean. Then it converts back to RGB and clips. That's the whole thing - mean and standard deviation, three channels, one pass.
Because it's statistics-based and not pixel-corresponding, the reference does not need to be the same size as the source. Want the palette of a 512px reference on a 4K frame? Fine. It also means it can't fix local problems: if the neural pass moved one hand's skin tone and nothing else, a global statistic transfer will drag everything else along with it.
The one property worth memorising: if Source and Reference are the same image, the transform is an identity, so the output equals the input. People report that as a bug roughly once a week. It isn't.
Inputs and output
Three fields, and only two of them are required.
- Source Image (
IMAGE) - the drifted one. The Enhance node's output. - Reference Image (
IMAGE) - the colors you actually wanted, almost always the pre-enhance original. - Match Strength - float, 0 to 1, default 1. At 1 you get the full transfer; at 0 you get the source back untouched; in between it blends linearly, which is the useful part.
Output is matched_image (IMAGE). It goes straight to Save Image, Image Comparer, or Video Combine if you're working frame batches - there's nothing else to wire.
The batch trap, and how to avoid it
This is the gotcha that will actually bite you. The node grabs source_image[0] and reference_image[0] - the first frame of each batch - runs the transfer on those, and returns a batch of exactly one image. Hand it a 30-frame batch and you get one frame back. Silent, no error.
So don't put this in a video pipeline expecting per-frame correction. Two workarounds that hold up:
- Match a representative frame, apply those numbers elsewhere. Run one frame through, then do the same adjustment on the clip with whatever grade/curve node you prefer - the transfer values are just mean/std offsets.
- Let the pack's own stages do the video work. DLSS5 Color Enhancement writes into the CLI's
coloringstage, which runs per-frame inside the native pass. That's the batch-correct path; Color Matcher is the still-image patch.
One more: the blend happens in 8-bit space, so heavy strength on very dark sources can posterize. If that shows up, back Match Strength off to 0.6–0.8.
Install
No separate install - it's one of the eight nodes in the pack and appears under DLSS5_v17.
cd ComfyUI/custom_nodes
git clone https://github.com/Strix-3D/ComfyUI-DLSS5-Enhancer-v15
Then the deps, which matter more than usual here because this node is the one that actually imports skimage:
.\python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-DLSS5-Enhancer-v15\requirements.txt
Restart ComfyUI. ModuleNotFoundError: skimage on load means step two got skipped or ran against the wrong Python - run it with the same interpreter ComfyUI itself uses.
When it's the wrong tool
If the render's colors look right and the image looks flat, this node won't save you: matching to the original will faithfully restore the original's flatness. Same if you deliberately pushed DLSS5's Cinematic NR style for punch and then match back to the source - you're pulling the punch right back out. Reach for it when the drift is the complaint, not when the look is.
And once it's in the chain, don't also crank DLSS5 Color Enhancement. Matching is deterministic and dull; grading on top of a match on top of a neural pass is how you end up with a muddy result and three suspects.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Source Image | IMAGE | The enhanced/drifted image (output of the Enhance node). | |
| Reference Image | IMAGE | The image whose colors you want (usually the original input). | |
| Match Strengthopt | FLOAT | 1.000–1 | Blend between original (0) and fully matched (1). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| matched_image | IMAGE | — |