Image Match Properties (Legacy)
Make a generated image inherit the reference's color and light
- original_image
- generated_image
- mask
- image
Your img2img pass nailed the composition but the colors drifted - too warm, too flat, or the lighting doesn't match the scene you're compositing into. Image Match Properties (Legacy) is the correction step that needs no model and no re-sampling: it takes a reference image and a generated image, and remaps the generated one's color and luminance toward the reference while leaving the actual detail alone.
The mechanism is histogram matching in LAB color space, done carefully. LAB splits an image into a luminance channel (L) and two color channels (a, b), which is exactly the split you want for this job - the node can match color without wrecking brightness and vice versa. It matches the L histogram for lighting and the a/b histograms for color, then blends the result back toward the generated original using your weight knobs. The texture_preservation trick is the interesting bit: when it's above 0, the node runs a bilateral filter to separate low-frequency "base" lighting from high-frequency texture, matches only the base, and lays the generated image's own texture back on top. That's how you match the mood without turning the image into a featureless smear.
The inputs that matter
- original_image - the reference whose color/lighting you're copying.
- generated_image - the one being adjusted. It keeps its detail; only the color/lighting moves.
- overall_weight - master strength, multiplied into both color and lighting adjustments. 1.0 default.
- color_weight / lighting_weight - how much of each adjustment, before the overall weight is applied. Useful when the colors are right but the light's wrong (or vice versa).
- texture_preservation - keeps generated edges and texture crisp by only matching low frequencies. 0.5 default; push toward 1 for maximum detail retention.
- mask - optional, softens the changes onto only part of the generated image.
The output
A single image, same size as the generated input, with the reference's color/lighting characteristics blended in. Wire it where you would have wired the generated image - before compositing, before saving.
Installing it
Part of silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager → search ComfyUI-UtilsCollection → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart after. Dependencies: opencv-python (this is a pure OpenCV job) and typing-extensions. No models. "(Legacy)" marks the compat alias for the pack's canonical UC_ImageMatchProperties.
Where people get burned
It's a color match, not a color transfer - don't expect it to import a reference's exact palette or its subject's skin tone, because it's matching distributions, not semantics. The other classic failure is matching a reference that's wildly different in composition or exposure; histograms don't care about where things are, so a backlit reference will drag your well-lit image toward its shadows. And if the output looks mushy, your texture_preservation is too low - that knob is the difference between "matching the mood" and "blurring the image."
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| original_image | IMAGE | Connect the original image. The node automatically finds where it appears inside the larger result, including when its size changed. | |
| generated_image | IMAGE | Connect the outpainted image. Colors near the matched original-image edges are used to correct the whole result. | |
| overall_weight | FLOAT | 1.0000–3 | Strength of the complete correction. 0 keeps the generated image unchanged, 1 applies the measured correction, and values above 1 make every correction stronger. |
| color_weight | FLOAT | 1.0000–3 | Matches the original image's overall color cast and balance. Values above 1 push the result farther toward those colors. It does not copy colors by pixel position. |
| lighting_weight | FLOAT | 1.0000–3 | Matches the original image's overall brightness. Values above 1 make the brightness correction stronger. |
| texture_preservation | FLOAT | 0.5000–1 | Keeps fine detail from the generated image while correcting contrast. Increase it if textures become too harsh or too soft. |
| maskopt | MASK | Connect the outpaint mask when available. White generated areas are measured and corrected; black original areas stay unchanged. The correction feathers automatically inside the generated edge. Leave disconnected for automatic edge matching and whole-image correction. | |
| saturation_weightopt | FLOAT | 1.0000–3 | Matches how vivid or muted the original image is. Values above 1 strengthen the saturation correction; lower it if the result becomes too colorful. |
| contrast_weightopt | FLOAT | 1.0000–3 | Matches the difference between dark and bright areas in the original image. Values above 1 strengthen the contrast correction; lower it if shadows or highlights become too strong. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |