Visit ComfyUI Online for ready-to-use ComfyUI environment
Adjust input image colors to match reference image using LAB color space statistics for visual consistency.
The ColorMatchToReference node is designed to adjust the color tones of a set of input images to match those of a reference image. This is achieved through a process that involves converting the images to the LAB color space, where the mean and standard deviation of the reference image's color channels are used to align the color distribution of the input images. By doing so, the node ensures that the input images adopt the color characteristics of the reference image, which can be particularly useful in scenarios where a consistent color palette is desired across multiple images or frames in a video. The node provides a flexible approach by allowing you to control the strength of the color matching effect, making it a powerful tool for enhancing visual consistency in your projects.
This parameter represents the batch of images whose colors you want to adjust. The images are processed in batches, and each image is converted to the LAB color space to facilitate color matching. The input should be in the form of a tensor, and the images are expected to be in RGB format.
The reference image is the image whose color characteristics you want to apply to the input images. It serves as the standard for color matching, and its mean and standard deviation in the LAB color space are used to adjust the input images. The reference image should also be in RGB format and is processed similarly to the input images.
This parameter controls the intensity of the color matching effect. It is a floating-point value ranging from 0.0 to 1.0, where 0.0 means no color matching is applied, and 1.0 means full color matching to the reference image. The default value is 1.0, allowing for complete color alignment by default.
The batch size determines how many images are processed at a time. This can impact the performance and memory usage of the node. The parameter is an integer with a default value of 4, and it can range from 0 to 500. Adjusting the batch size can help optimize processing based on your system's capabilities.
The output is a batch of images that have been color-matched to the reference image. Each image in the output retains the original content but with adjusted color tones that reflect the reference image's color characteristics. The output images are in RGB format and are clamped to ensure valid color values.
match_strength to a value less than 1.0. This allows for a blend between the original and reference colors, providing a more natural look.batch_size values to find the optimal performance for your system. Larger batch sizes may speed up processing but require more memory.batch_size to decrease memory usage or ensure that other GPU-intensive applications are closed to free up resources.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.