Image Match Properties
Make the new shot match the old light
- original_image
- generated_image
- mask
- image
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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| original_image | IMAGE | Reference image whose color and lighting properties are matched. | |
| generated_image | IMAGE | Image adjusted toward the reference while retaining its generated detail. | |
| overall_weight | FLOAT | 1.0000–1 | Overall strength multiplying both color and lighting adjustments. |
| color_weight | FLOAT | 1.0000–1 | Strength of reference color matching before the overall weight is applied. |
| lighting_weight | FLOAT | 1.0000–1 | Strength of reference luminance matching before the overall weight is applied. |
| texture_preservation | FLOAT | 0.5000–1 | Preserves edges and textures from the generated image by matching only low-frequency properties. |
| maskopt | MASK | Optional mask to softly blend the color/lighting changes onto the generated image. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |