Nodes/ComfyUI_AceNodes/πŸ… Image Color Fix
ComfyUI Node

πŸ… Image Color Fix

Re-tint a batch to match a reference image β€” Wavelet or AdaIN, no training

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Image Color Fix
  • images
  • color_map_images
  • IMAGE
β—„color_fixβ–Ύβ–Ί

Every upscaling or img2img pipeline eventually has the same bad day: the image comes back, and the colors are wrong. Slightly green shadows, washed-out highlights, skin tone that drifted. There are a dozen "color match" nodes around, and they mostly do one of two things - this node does both and lets you pick. It transfers the color statistics of a reference image onto your images, the same family of trick behind ColorMatchToReference-style nodes that people bolt onto high-res fix passes.

It's part of πŸ… Ace Nodes (hay86/ComfyUI_AceNodes), the usual one-author grab-bag. Small pack, minimal footprint, no cloud calls - everything here runs locally.

How it works

You feed in images (the ones to fix) and color_map_images (the reference), then choose the method:

  • Wavelet - decomposes both images into low-frequency (color) and high-frequency (detail) components, then keeps your image's detail and splices in the reference's low-frequency color. Result: you keep your sharpness and structure, you adopt the reference's palette and lighting. This is the one to reach for in an upscale pass where you don't want to smear edges.
  • AdaIN - adaptive instance normalization: it re-maps the mean and standard deviation of your image's color channels onto the reference's. Faster, cruder, a global tint shift. Good for a quick "make this look like that lighting" move; can push per-channel contrast in weird ways on skin.

Both run on tensors locally, no model download, no VRAM pressure worth mentioning.

Practical notes

  • The two inputs can be different batch lengths - it pairs them up positionally and recycles the last reference image for any leftovers, so one reference against a whole batch works fine.
  • Inputs don't need to match in resolution for AdaIN; Wavelet resizes the reference to your image's size internally.
  • Output is IMAGE, same batch structure as your input. Wire it straight into a save or a VAE decode.

Where people get burned: using Wavelet on a reference that's a different content - it transfers color low-frequency, so if your reference is a night scene and your image is a day scene, you'll get night-colored shadows on day geometry, which reads as "wrong color grade," not "matched." The technique assumes the reference is the same scene shot differently, or at least the same lighting intent. For a same-scene retint it's genuinely excellent; for arbitrary "make image A look like image B" it's approximate at best.

Installing

ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/hay86/ComfyUI_AceNodes

Then restart. The pack's requirements.txt pulls in the whole kitchen sink (rembg, transformers, insightface, soundfile…) even though this node only needs torch and torchvision, both already present in ComfyUI. So install cost is higher than the node's actual footprint - the usual story with grab-bag packs.

If your only color problem is a VAE that darkens or shifts everything, this isn't the right tool - that's a VAE problem, and the fix is a better VAE or a ColorCorrect node. But if you have a reference grade you want a batch to conform to, this is a solid, fast, dependency-light way to get it.

CategoryAce Nodes

Inputs (3)

NameTypeDefaultDescription
imagesIMAGEβ€”
color_map_imagesIMAGEβ€”
color_fixCOMBO2 options: Wavelet, AdaIN

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”