ComfyUI > Nodes > ComfyUI Essentials > 🔧 Image Histogram Match

ComfyUI Node: 🔧 Image Histogram Match

Class Name

ImageHistogramMatch+

Category
essentials/image processing
Author
cubiq (Account age: 5020days)
Extension
ComfyUI Essentials
Latest Updated
2024-07-01
Github Stars
0.35K

How to Install ComfyUI Essentials

Install this extension via the ComfyUI Manager by searching for ComfyUI Essentials
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Essentials in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🔧 Image Histogram Match Description

Adjusts image color distribution to match reference image histogram for consistent color grading and enhancement.

🔧 Image Histogram Match+:

The ImageHistogramMatch+ node is designed to adjust the color distribution of an image to match the histogram of a reference image. This process, known as histogram matching, ensures that the color tones and intensities of the target image closely resemble those of the reference image. This can be particularly useful in applications where you want to achieve a consistent look across multiple images or when you need to apply a specific color grading style from one image to another. The node leverages advanced techniques to compute and apply the necessary transformations, making it a powerful tool for image processing and enhancement tasks.

🔧 Image Histogram Match+ Input Parameters:

image1

This parameter represents the target image whose histogram will be adjusted. The image should be provided in a compatible format, typically as a tensor. The quality and resolution of this image will directly impact the final result, so using high-quality images is recommended.

image2

This parameter is the reference image whose histogram will be used as the template for adjustment. Similar to the target image, it should be provided in a compatible format. The reference image's color distribution will dictate the transformation applied to the target image, so choose an image with the desired color characteristics.

🔧 Image Histogram Match+ Output Parameters:

IMAGE

The output is the transformed image with its histogram matched to that of the reference image. This image will have color tones and intensities adjusted to closely resemble those of the reference image, providing a consistent and visually appealing result.

🔧 Image Histogram Match+ Usage Tips:

  • Ensure that both the target and reference images are of similar resolution and quality to achieve the best results.
  • Use high-quality reference images with the desired color characteristics to guide the histogram matching process effectively.
  • Experiment with different reference images to see how various color distributions affect the target image.

🔧 Image Histogram Match+ Common Errors and Solutions:

AssertionError: dst.device == ref.device

  • Explanation: This error occurs when the target and reference images are not on the same device (e.g., one is on the CPU and the other on the GPU).
  • Solution: Ensure that both images are loaded onto the same device before passing them to the node.

RuntimeError: size mismatch

  • Explanation: This error happens when the dimensions of the target and reference images do not match.
  • Solution: Resize the reference image to match the dimensions of the target image before performing histogram matching.

ValueError: Unsupported image format

  • Explanation: This error indicates that the provided images are in an unsupported format.
  • Solution: Convert the images to a supported format, such as RGB, before using the node.

🔧 Image Histogram Match Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Essentials
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.