ComfyUI Node: Contrast

Class Name

ContrastNode

Category
image
Author
aria1th (Account age: 3016days)
Extension
ComfyUI-LogicUtils
Latest Updated
2026-01-21
Github Stars
0.1K

How to Install ComfyUI-LogicUtils

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

Contrast Description

Adjusts image contrast to enhance light-dark differences using PIL's `ImageEnhance.Contrast`.

Contrast:

The ContrastNode is designed to adjust the contrast of an image, enhancing the difference between the light and dark areas to make the image appear more vivid or subdued, depending on the desired effect. This node is particularly useful for improving the visual appeal of images by making them more dynamic and engaging. By manipulating the contrast, you can highlight specific features or details within an image, making it a powerful tool for artists and designers looking to refine their visual content. The node utilizes the ImageEnhance.Contrast method from the PIL library, ensuring high-quality results that maintain the integrity of the original image while allowing for significant visual adjustments.

Contrast Input Parameters:

image

The image parameter is the input image that you want to adjust the contrast for. It is required and should be provided in a compatible image format. This parameter serves as the base upon which the contrast adjustments will be applied, and its quality and resolution will directly affect the output.

factor

The factor parameter is a floating-point value that determines the level of contrast adjustment applied to the image. A factor of 1.0 means no change to the contrast, values less than 1.0 will decrease the contrast making the image appear more muted, and values greater than 1.0 will increase the contrast, making the image appear more vivid. The default value is 1.0, and it is important to choose a factor that aligns with your artistic vision for the image.

Contrast Output Parameters:

IMAGE

The output is an IMAGE that has undergone contrast adjustment based on the specified factor. This output image will reflect the changes in contrast, with enhanced or reduced differences between light and dark areas, depending on the factor applied. The output is crucial for visualizing the effects of contrast adjustments and can be used in further image processing or as a final product.

Contrast Usage Tips:

  • Experiment with different factor values to achieve the desired level of contrast. Start with small increments to see subtle changes before making larger adjustments.
  • Use the ContrastNode in conjunction with other nodes like BrightnessNode or ColorNode to achieve a balanced and harmonious image enhancement.
  • Consider the context of the image when adjusting contrast; for instance, increasing contrast can make details pop in a landscape photo, while reducing contrast might be more suitable for a soft portrait.

Contrast Common Errors and Solutions:

Image format not supported

  • Explanation: The input image is not in a format that the node can process.
  • Solution: Ensure that the image is in a compatible format such as JPEG or PNG before inputting it into the node.

Factor value out of range

  • Explanation: The factor value provided is outside the acceptable range for contrast adjustment.
  • Solution: Ensure that the factor is a positive floating-point number, ideally between 0.0 and 2.0, to avoid unexpected results or errors.

Image processing failed

  • Explanation: An error occurred during the contrast adjustment process, possibly due to an issue with the image data.
  • Solution: Verify the integrity of the input image and try reprocessing it. If the problem persists, check for any updates or patches for the node that might address the issue.

Contrast Related Nodes

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