🎨 Color Match
Fix the per-tile color drift that tiled upscaling always leaves behind
- image
- reference
- image
If you've run a tiled upscale with a generative model - SUPIR, a tile-ControlNet pass, any of them - you've seen the artifact: the image gets big and detailed, but the color is subtly different from tile to tile. One quadrant runs a touch warm, another goes green, and the seams glow even when there's no edge mismatch. That's not the upscaler being broken; it's each tile being sampled independently and drifting off a shared color baseline.
🎨 Color Match is the cleanup pass for exactly that. You feed it your output image plus a reference - in the simplest setup, the original image you upscaled - and it aligns the output's color statistics to the reference. The author's stated use case is right in the node description: "修复分块放大色调漂移" - fix the color drift from tiled upscaling. It's a color-correction node, not a filter; it doesn't invent anything, it just makes your colors consistent again.
Four matching methods, one default that matters
The method dropdown is where this node earns its keep:
wavelet(the default) - decomposes image and reference into high-frequency (detail) and low-frequency (tone) components, then combines your detail with the reference's tone. That's the key insight for upscaling: the details you just spent VRAM generating stay untouched, only the tonal envelope gets replaced. This is why the author recommends it for upscale workflows.mvgd- Monge-Kantorovich covariance matching (Pitié et al., 2007). It matches mean and covariance between source and reference, so it preserves channel-to-channel color relationships better than plain mean/std. Slightly more expensive, better when the source is genuinely off.mean_std- per-channel mean + standard deviation (Reinhard-style). Fast, smooth, the "good enough" option.histogram- per-channel histogram matching. The most aggressive; it forces the full tonal distribution to match, which can push in artifacts. The author's tooltip flags it as the most prone to them. Use it last.
strength (0–1) blends between the original and the matched result, so you can go half-way and keep some of the source's character. enabled is a one-click bypass for A/B comparison - flick it off and you're looking at the raw output, which is the honest way to check whether the match is actually helping.
Where to put it in the graph
The author gives the placement advice right in the code comments, and it's good advice: for maximum precision, match each tile against its corresponding source tile before TileGather. If that's too invasive, drop it after the tiles are reassembled and match the whole image against the original - simpler, and usually good enough since you're correcting a global cast, not per-tile seams. reference is resized to match the input automatically, and there's no resolution constraint; output is a plain image you can chain anywhere.
Installing it
This is part of the Louis Use pack - install once and you get all ~20 nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/LouisLU1997/ComfyUI-louis-use Louis_use
Or search "Louis Use" in ComfyUI Manager, then restart. No extra dependencies; the color math is plain torch running on CPU or GPU.
The honest caveat
Color Match fixes global drift, not structural seams. If your tiled upscale also produced hard edge discontinuities or duplicated texture, this node won't fix that - you need to revisit the tile overlap/denoise settings, or switch upscaler strategy. It's the last 10% of polish for a workflow that's already mostly working, and it's very good at that one job. Don't expect it to rescue a broken upscale.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| reference | IMAGE | — | |
| enabled | BOOLEAN | true | — |
| method | COMBO | wavelet | wavelet=只换色调保留细节(放大场景推荐);mvgd=协方差匹配;mean_std=快速;histogram=直方图 |
| strength | FLOAT | 1.000–1 | 对齐强度,0=原样输出,1=完全对齐参考 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |