ComfyUI > Nodes > ComfyUI 1hewNodes > Match Brightness Contrast

ComfyUI Node: Match Brightness Contrast

Class Name

1hew_MatchBrightnessContrast

Category
1hewNodes/color
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI 1hewNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 1hewNodes 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Match Brightness Contrast Description

Adjusts source image brightness/contrast to match a reference, ensuring visual consistency.

Match Brightness Contrast:

The 1hew_MatchBrightnessContrast node is designed to adjust the brightness and contrast of a source image to match that of a reference image. This node is particularly useful for ensuring visual consistency across a series of images or when integrating elements from different sources into a cohesive composition. By aligning the brightness and contrast levels, you can achieve a more harmonious and professional look in your visual projects. The node offers flexibility by allowing you to focus on specific areas of the image, such as the edges, to calculate the necessary adjustments, thereby ignoring variations in the central content. This feature is especially beneficial when the central part of the image contains elements that should not influence the overall brightness and contrast matching.

Match Brightness Contrast Input Parameters:

source_image

The source_image parameter is the image whose brightness and contrast you wish to adjust. It serves as the primary input that will be modified to match the reference image. This parameter is crucial as it determines the starting point for the adjustments.

reference_image

The reference_image parameter is the image that provides the target brightness and contrast levels. The source image will be adjusted to match the visual characteristics of this reference image, ensuring consistency between the two.

edge_amount

The edge_amount parameter specifies the proportion of the image's edges to be used for statistical calculations. It ranges from 0.0 to 8192.0, with a default value of 0.2. By focusing on the edges, you can ignore changes in the central content, which is useful when the center contains elements that should not affect the overall brightness and contrast matching.

consistency

The consistency parameter allows you to choose how the node maintains consistency across frames. Options include "lock_first," "lock_mid," "lock_end," and "frame_match," with "lock_first" as the default. This parameter is essential for ensuring that the adjustments remain consistent across a sequence of images, which is particularly important in animations or video processing.

method

The method parameter determines the technique used for matching brightness and contrast. You can choose between "standard" and "histogram," with "histogram" as the default. This choice affects how the node calculates the necessary adjustments, with each method offering different advantages depending on the specific characteristics of the images involved.

Match Brightness Contrast Output Parameters:

image

The image output parameter is the adjusted version of the source image. It reflects the changes made to match the brightness and contrast of the reference image. This output is crucial for achieving the desired visual consistency and is the final product of the node's processing.

Match Brightness Contrast Usage Tips:

  • To achieve the best results, ensure that the reference image accurately represents the desired brightness and contrast levels for your project.
  • Experiment with the edge_amount parameter to find the optimal balance between edge and central content influence, especially if the central content should remain unaffected.
  • Use the consistency parameter to maintain uniform adjustments across multiple frames, which is particularly useful in video editing or animation sequences.

Match Brightness Contrast Common Errors and Solutions:

Mismatched Device Error

  • Explanation: This error occurs when the source and reference images are not on the same device, leading to processing issues.
  • Solution: Ensure both images are on the same device by transferring one to match the other's device using the .to() method.

Invalid Edge Amount

  • Explanation: An edge amount outside the valid range can cause errors in processing.
  • Solution: Verify that the edge_amount is within the specified range of 0.0 to 8192.0 and adjust it accordingly.

Inconsistent Batch Sizes

  • Explanation: If the source and reference images have different batch sizes, it can lead to processing errors.
  • Solution: Ensure that both images have matching batch sizes or handle the mismatch by adjusting the processing logic to accommodate different sizes.

Match Brightness Contrast Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI 1hewNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

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.

Match Brightness Contrast