ComfyUI Node: Image Levels

Class Name

JWImageLevels

Category
jamesWalker55
Author
jamesWalker55 (Account age: 2581days)
Extension
Various ComfyUI Nodes by Type
Latest Updated
2024-07-27
Github Stars
0.04K

How to Install Various ComfyUI Nodes by Type

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

Adjust image levels for brightness/contrast control, tonal range fine-tuning, and vibrant artwork enhancement.

Image Levels:

The JWImageLevels node is designed to adjust the levels of an image, allowing you to control the brightness and contrast by setting minimum and maximum values. This node is particularly useful for fine-tuning the tonal range of an image, ensuring that the details in the shadows and highlights are appropriately balanced. By manipulating the levels, you can enhance the overall visual appeal of your artwork, making it more vibrant and dynamic. This node is essential for artists looking to achieve precise control over the tonal distribution in their images.

Image Levels Input Parameters:

image

This parameter accepts an image in the form of a tensor. The image is the primary input on which the level adjustments will be applied. Ensure that the image is correctly formatted as a tensor to avoid any processing issues.

min

The min parameter sets the minimum level for the image adjustment. It defines the darkest point in the image, with a default value of 0.0. The value can range from 0.0 to 1.0, with increments of 0.01. Adjusting this parameter will affect the shadows and darker areas of the image, making them lighter or darker depending on the value set.

max

The max parameter sets the maximum level for the image adjustment. It defines the brightest point in the image, with a default value of 1.0. The value can range from 0.0 to 1.0, with increments of 0.01. Adjusting this parameter will affect the highlights and brighter areas of the image, making them lighter or darker depending on the value set.

Image Levels Output Parameters:

image

The output is an image tensor with adjusted levels based on the specified min and max values. This processed image will have its tonal range modified, enhancing the overall contrast and brightness according to the input parameters.

Image Levels Usage Tips:

  • To enhance the contrast of an image, set the min value slightly higher than 0.0 and the max value slightly lower than 1.0.
  • For a more dramatic effect, increase the difference between the min and max values.
  • Use this node in combination with other color adjustment nodes to achieve a balanced and visually appealing result.

Image Levels Common Errors and Solutions:

"AssertionError: image must be a torch.Tensor"

  • Explanation: This error occurs when the input image is not provided as a tensor.
  • Solution: Ensure that the input image is correctly formatted as a torch tensor before passing it to the node.

"AssertionError: min must be a float"

  • Explanation: This error occurs when the min parameter is not provided as a float.
  • Solution: Ensure that the min value is a float within the range of 0.0 to 1.0.

"AssertionError: max must be a float"

  • Explanation: This error occurs when the max parameter is not provided as a float.
  • Solution: Ensure that the max value is a float within the range of 0.0 to 1.0.

"ZeroDivisionError: division by zero"

  • Explanation: This error occurs when the min and max values are set to the same value, causing a division by zero.
  • Solution: Ensure that the min and max values are different to avoid division by zero.

Image Levels Related Nodes

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