ComfyUI > Nodes > comfy-plasma > AutoContrast

ComfyUI Node: AutoContrast

Class Name

JDC_AutoContrast

Category
image/postprocessing
Author
Jordach (Account age: 4522days)
Extension
comfy-plasma
Latest Updated
2024-05-22
Github Stars
0.05K

How to Install comfy-plasma

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

AutoContrast Description

Automatically adjusts image contrast for enhanced visual appeal and improved balance, clarity, and detail.

AutoContrast:

The JDC_AutoContrast node is designed to automatically adjust the contrast of an image, enhancing its visual appeal by making the dark areas darker and the light areas lighter. This node is particularly useful for improving the overall balance and clarity of an image without requiring manual adjustments. By leveraging the autocontrast method, it ensures that the full range of pixel values is utilized, which can significantly enhance the details and dynamic range of the image. This node is ideal for AI artists looking to quickly and effectively enhance their images with minimal effort.

AutoContrast Input Parameters:

IMAGE

This parameter represents the input image that you want to process. The image should be in a compatible format that the node can handle, typically an RGB image.

cutoff

The cutoff parameter specifies the percentage of the lightest and darkest pixels to be cut off from the histogram before computing the contrast. This helps in ignoring outliers that might skew the contrast adjustment. The value ranges from 0 to 100, with a default value of 2. A higher cutoff value will result in more extreme contrast adjustments, while a lower value will make the adjustment more subtle.

min_value

The min_value parameter sets the minimum pixel value that should be considered during the contrast adjustment. If set to -1, this parameter is ignored. The value ranges from -1 to 255, with a default value of -1. Setting this to a specific value can help in preserving certain details in the image that might otherwise be lost during the contrast adjustment.

AutoContrast Output Parameters:

IMAGE

The output is the processed image with adjusted contrast. This image will have enhanced visual clarity and a more balanced distribution of pixel values, making it more visually appealing and detailed.

AutoContrast Usage Tips:

  • For images with a lot of noise or outliers, consider increasing the cutoff value to ignore these extreme values and achieve a more balanced contrast adjustment.
  • If you want to preserve certain details in the darker or lighter areas of the image, set the min_value parameter to a specific value rather than leaving it at the default -1.

AutoContrast Common Errors and Solutions:

TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

  • Explanation: This error occurs when the input image is not provided or is in an unsupported format.
  • Solution: Ensure that the input image is correctly loaded and is in a compatible format such as RGB.

ValueError: cutoff must be between 0 and 100

  • Explanation: This error occurs when the cutoff value is set outside the allowed range.
  • Solution: Adjust the cutoff value to be within the range of 0 to 100.

ValueError: min_value must be between -1 and 255

  • Explanation: This error occurs when the min_value is set outside the allowed range.
  • Solution: Adjust the min_value to be within the range of -1 to 255.

AutoContrast Related Nodes

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