Nodes/Comfyui-ergouzi-Nodes/2🐕Preserve brightness
ComfyUI Node

2🐕Preserve brightness

Match another image's color without blowing out your exposure

By 11dogzi·Created 2 years ago·Updated 2 years ago· 102
2🐕Preserve brightness
  • source_image
  • target_image
  • result_image

Color migration nodes copy one image's palette onto another - useful for matching a relit subject to its background, or pulling a generation toward a reference photo's look. The catch with most of them is they copy everything, brightness included, so a bright reference can wash out a correctly-exposed target and a dark one can crush it. Preserve brightness is the ergouzi pack's fix for that: it migrates color the same way, but locks the target's own exposure in place while it does it. If you've used this pack's plain Regular color migration node before, think of this as that node with a guardrail on brightness.

How it works

Two images go in, one comes out. source_image is the reference - the color story you want to borrow. target_image is the image that gets recolored, and it's also the one whose brightness is protected: the node pulls hue and color balance from the source and applies them to the target, but keeps the target's own luminance where it was instead of also importing the source's. That matters more than it sounds - this exact failure mode (an image getting lighter, darker, or shifting saturation just from moving color data between images) is the same complaint that shows up around inpainting compositing, where a VAE round-trip alone can shift exposure even at zero denoise. This node exists to let you fix the color cast without also inheriting that kind of tonal drift from your reference.

The inputs and outputs that matter

  • source_image (IMAGE, required) - the color reference. Its hue and tone get copied over; its brightness does not.
  • target_image (IMAGE, required) - the image being corrected. Comes out with the source's color character but its own original exposure.

Output is a single result_image (IMAGE) - wire it straight into whatever's next, a save node or another color pass.

There are no numeric knobs here. It's a two-image-in, one-image-out node - all the "control" is which image you plug into which slot.

How to install it

Search Comfyui-ergouzi-Nodes in ComfyUI Manager, or clone it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/11dogzi/Comfyui-ergouzi-Nodes.git

Restart ComfyUI and it shows up under the pack's own 2🐕 category rather than ComfyUI's built-in image menus. Worth knowing going in: the author's README marks this English repo as no longer updated, pointing anyone who wants the fuller feature set at a Chinese-named sibling repo instead. That doesn't affect what's already here, but don't expect new options to land on this side.

Common issues & troubleshooting

Result looks backwards. source_image and target_image aren't interchangeable - swap them and you're now migrating the other image's color onto your reference instead of the way you meant. If the output looks like the wrong picture got recolored, that's almost always it.

No visible change at all. If your two images already share a similar palette, there's not much for the node to migrate, and a preserve-brightness color transfer on two already-matched images can look close to a no-op. That's expected - this node is for correcting a mismatch, not for adding a stylistic grade on top of images that already agree.

You actually wanted the brightness to move too. This node deliberately won't touch exposure. If you're trying to fully match one image's whole look - tone and all - to another, reach for the pack's plain color-migration node instead; this one is specifically for the case where your target's exposure is already right and only the color is off, which is the more common situation right after a local repair or composite where you don't want to re-introduce a lighting mismatch you just fixed.

Category2🐕/🖼️Image/🎨Color processing

Inputs (2)

NameTypeDefaultDescription
source_imageIMAGE
target_imageIMAGE

Outputs (1)

NameTypeDescription
result_imageIMAGE