Nodes/ComfyUI-UtilsCollection/Image Match Properties
ComfyUI Node

Image Match Properties

Make the new shot match the old light

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Image Match Properties
  • original_image
  • generated_image
  • mask
  • image
overall_weight1.000
color_weight1.000
lighting_weight1.000
texture_preservation0.500

Color mismatch is the tell that gives away a composite: the subject looks generated because its white balance, temperature, and lighting don't match the scene around it. UC_ImageMatchProperties exists to kill that tell - it adjusts a generated image toward the color and lighting of a reference image while hanging onto the generated image's own detail.

This is the "match the insert to the plate" node for workflows that composite generated content into a real photo, or that chain two generations and want them to read as one lighting setup. The reference (original_image) provides the color story; the subject (generated_image) provides the texture; the output is the subject recolored into the scene.

How it works

It separates the adjustment into two independently-weighted axes: color_weight (default 1) steers the reference's color distribution, and lighting_weight (default 1) steers luminance. Both are multiplied by overall_weight (default 1) for a master strength. The clever part is texture_preservation (default 0.5): matching only low-frequency properties - the broad color and light fields - while leaving high-frequency edges and texture from the generated image untouched. That's the difference between "recolored to match" and "smudged into the scene." An optional mask softly confines the change to a region rather than the whole image.

The inputs that matter

  • original_image - the reference whose color/lighting you're matching.
  • generated_image - what gets adjusted.
  • overall_weight - the single "how much of this do I want" knob. Dial it back from 1 when the match looks overdone.
  • color_weight / lighting_weight - separate the two axes when only one is off.
  • texture_preservation - raise it if the match is eating detail; lower it if the match isn't reaching.

Single output: image.

Installing it

ComfyUI Manager → search "ComfyUI-UtilsCollection", or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart. Pack deps are opencv-python and typing-extensions, no models or API keys. Newer-extension-API pack - keep ComfyUI current.

The beginner trap is cranking overall_weight to 1 with both color and lighting fully weighted and wondering why the subject now carries the reference's brightness structure - a bright scene will blow out your insert, a dark one will crush it. When the match fights you, drop lighting_weight first; color match is usually what you actually wanted. And remember it's a global color grade, not an illumination model - it won't relight a subject, it makes the light read as consistent.

Categoryadvanced/image

Inputs (7)

NameTypeDefaultDescription
original_imageIMAGEReference image whose color and lighting properties are matched.
generated_imageIMAGEImage adjusted toward the reference while retaining its generated detail.
overall_weightFLOAT1.0000–1Overall strength multiplying both color and lighting adjustments.
color_weightFLOAT1.0000–1Strength of reference color matching before the overall weight is applied.
lighting_weightFLOAT1.0000–1Strength of reference luminance matching before the overall weight is applied.
texture_preservationFLOAT0.5000–1Preserves edges and textures from the generated image by matching only low-frequency properties.
maskoptMASKOptional mask to softly blend the color/lighting changes onto the generated image.

Outputs (1)

NameTypeDescription
imageIMAGE