KJNodes/imagegenerated

Color Match(ColorMatch)

This node is implemented based on the `color-matcher` library and provides multiple color transfer algorithms, including MKL, HM, Reinhard, MVGD, and their hybrid methods.

Color Match

image_ref
image_target
image
method
mkl
strength
1.00
multithread
KJNodes

The Color Match node, implemented based on the color-matcher library, provides multiple color transfer algorithms, including MKL, HM, Reinhard, MVGD, and their hybrid methods.

The Color Match node is a tool for image color matching. Its core function is to adjust the color style of a target image to match that of a reference image. It analyzes the color distribution of the reference image and applies these distribution characteristics to the target image, enabling automated color correction and style transfer.

Node Functionality

This node is implemented based on the color-matcher library and provides various color transfer algorithms, including MKL, HM, Reinhard, MVGD, and their hybrid methods. It supports processing batches of image tensors and can optimize processing speed through a multithreading option. Its core mechanism achieves the matching effect by statistically analyzing and transforming the color space distribution of the images.

Node Parameter Description - Color Match

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
image_refIMAGEYes--Provides the reference image for the color style. The node will adjust the target image's color characteristics to match this image.
image_targetIMAGEYes--The target image that requires color matching. Its colors will be adjusted to match the reference image.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
methodCOMBOYesmkl"mkl", "hm", "reinhard", "mvgd", "hm-mvgd-hm", "hm-mkl-hm"Options include mkl, hm, reinhard, mvgd, hm-mvgd-hm, hm-mkl-hm.
strengthFLOATNo1.00.0 - 10.0 (Step: 0.01)-
multithreadBOOLEANNoTrue--

Output

Parameter NameData TypeDescription
imageIMAGEOutputs the image result after color matching processing.

Usage Scenarios

In image post-processing or stylization workflows, you can use an image with the desired color tone as a reference by connecting it to image_ref. Then, connect the image that needs adjustment to image_target. After selecting an appropriate matching method, you can quickly obtain an output image with a unified color style. This is commonly used for photo color grading, unifying painting styles, or color correction for video sequences.

Notes

Before use, ensure the necessary dependency library is installed via pip install color-matcher. The strength parameter allows control over the intensity of the matching effect. When set to 0, the node will skip processing and directly return the original image.

The Color Match node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…