ComfyUI > Nodes > ComfyUI-Curve > 📊 PS Histogram & Levels

ComfyUI Node: 📊 PS Histogram & Levels

Class Name

PhotoshopHistogramNode

Category
Image/Analysis
Author
aiaiaikkk (Account age: 443days)
Extension
ComfyUI-Curve
Latest Updated
2025-10-27
Github Stars
0.16K

How to Install ComfyUI-Curve

Install this extension via the ComfyUI Manager by searching for ComfyUI-Curve
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Curve 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

📊 PS Histogram & Levels Description

Node for comprehensive histogram analysis and level adjustments, similar to Adobe Photoshop's functionality.

📊 PS Histogram & Levels:

The PhotoshopHistogramNode is designed to provide comprehensive histogram analysis and level adjustments for images, similar to the histogram functionality found in Adobe Photoshop. This node allows you to analyze the distribution of pixel intensities across different channels, such as RGB and Luminance, and apply precise adjustments to enhance image quality. By leveraging this node, you can perform tasks like auto-levels and auto-contrast adjustments, which automatically optimize the tonal range of your images. The node is particularly beneficial for users looking to fine-tune image exposure and contrast, ensuring that the final output meets specific aesthetic or technical requirements. Its ability to handle batch processing makes it a powerful tool for efficiently managing multiple images at once.

📊 PS Histogram & Levels Input Parameters:

image

This parameter represents the input image that you want to analyze and adjust. It is crucial that the image is in the correct format and not None, as the node will raise an error if the image is missing. The image should ideally be in a format that supports multiple channels, such as RGB.

channel

The channel parameter specifies which color channel or combination of channels (e.g., RGB, Luminance) you want to analyze and adjust. This choice affects the histogram data generated and the adjustments applied. The default value is RGB.

input_black

This parameter sets the black point for input levels, determining the darkest point in the image. It ranges from 0.0 to 255.0, with a default value of 0.0. Adjusting this value can help in enhancing shadow details.

input_white

This parameter sets the white point for input levels, determining the brightest point in the image. It ranges from 0.0 to 255.0, with a default value of 255.0. Modifying this value can help in recovering highlight details.

gamma

The gamma parameter controls the midtone brightness of the image. It ranges from 0.0 to 255.0, with a default value of 1.0. Adjusting gamma can help in achieving the desired contrast and brightness balance.

output_black

This parameter sets the black point for output levels, affecting the darkest point in the adjusted image. It ranges from 0.0 to 255.0, with a default value of 0.0. It is used to compress or expand the tonal range.

output_white

This parameter sets the white point for output levels, affecting the brightest point in the adjusted image. It ranges from 0.0 to 255.0, with a default value of 255.0. It is used to compress or expand the tonal range.

auto_levels

A boolean parameter that, when enabled, automatically adjusts the levels to optimize the image's tonal range. The default value is False. This feature is useful for quick enhancements without manual adjustments.

auto_contrast

A boolean parameter that, when enabled, automatically adjusts the contrast of the image. The default value is False. This feature is useful for enhancing image contrast quickly.

clip_percentage

This parameter defines the percentage of pixels to clip when performing auto adjustments. It ranges from 0.0 to 5.0, with a default value of 0.1. Adjusting this value can help in controlling the extent of auto adjustments.

unique_id

A hidden parameter used internally to track changes and ensure consistent processing across different operations. It is not typically modified by the user.

📊 PS Histogram & Levels Output Parameters:

image

The processed image after applying the histogram adjustments. This output reflects the changes made based on the input parameters and any auto adjustments applied.

histogram_image

A visual representation of the histogram data, showing the distribution of pixel intensities across the selected channels. This output helps in understanding the tonal range and adjustments applied.

histogram_data

A string containing detailed histogram data, including information about the distribution of pixel intensities. This data is useful for in-depth analysis and understanding of the image's tonal characteristics.

statistics

A string containing statistical information about the image, such as mean and peak values for each channel. This output provides insights into the overall exposure and contrast of the image.

📊 PS Histogram & Levels Usage Tips:

  • Use the auto_levels and auto_contrast options for quick enhancements when you are unsure about the manual adjustments needed.
  • Adjust the input_black and input_white parameters to recover details in shadows and highlights, respectively.
  • Experiment with the gamma setting to achieve the desired midtone brightness and contrast balance.
  • Utilize the clip_percentage to control the extent of auto adjustments, especially when dealing with images that have a lot of noise or extreme lighting conditions.

📊 PS Histogram & Levels Common Errors and Solutions:

Input image is None

  • Explanation: This error occurs when the input image is not provided or is None.
  • Solution: Ensure that a valid image is passed to the node before execution.

Unexpected image dimensions

  • Explanation: This error arises when the input image does not have the expected dimensions, typically a 3D array for single images.
  • Solution: Verify that the input image is in the correct format and dimensions, such as height, width, and channels.

Error generating histogram

  • Explanation: This error indicates a problem in generating the histogram data, possibly due to incorrect image data or channel selection.
  • Solution: Check the input image and channel parameters to ensure they are correctly specified and compatible with the node's requirements.

📊 PS Histogram & Levels Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Curve
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.