Visit ComfyUI Online for ready-to-use ComfyUI environment
Isolate and manipulate shadow and highlight regions of images for targeted adjustments and refined look.
The LayerMask: Shadow & Highlight Mask node is designed to help you isolate and manipulate the shadow and highlight regions of an image. This node is particularly useful for AI artists who want to enhance or modify specific tonal areas within their artwork. By generating separate masks for shadows and highlights, you can apply targeted adjustments, such as color correction, contrast enhancement, or selective blurring, to achieve a more refined and professional look. The node works by analyzing the luminance values of the image and creating masks based on user-defined thresholds and ranges, allowing for precise control over the shadow and highlight areas.
This parameter accepts the input image that you want to process. The image should be in a format compatible with the node, typically an RGB image.
This integer parameter allows you to adjust the baseline level for detecting shadows. The value can range from -99 to 99, with a default of 0. Increasing this value will make the node more sensitive to darker areas, while decreasing it will make it less sensitive.
This float parameter defines the range within which the node will detect shadow areas. The value can range from 0.01 to 0.99, with a default of 0.25. A larger range will include more tonal values as shadows, while a smaller range will be more selective.
This integer parameter allows you to adjust the baseline level for detecting highlights. The value can range from -99 to 99, with a default of 0. Increasing this value will make the node more sensitive to brighter areas, while decreasing it will make it less sensitive.
This float parameter defines the range within which the node will detect highlight areas. The value can range from 0.01 to 0.99, with a default of 0.25. A larger range will include more tonal values as highlights, while a smaller range will be more selective.
This optional parameter allows you to provide a mask that can be used to limit the area of the image where the shadow and highlight detection will be applied. If not provided, the entire image will be processed.
This output parameter provides the mask for the shadow areas of the input image. The mask is a binary image where the shadow regions are highlighted, allowing you to apply further processing or adjustments specifically to these areas.
This output parameter provides the mask for the highlight areas of the input image. Similar to the shadow mask, this binary image highlights the regions of the image that are considered highlights, enabling targeted adjustments.
shadow_level_offset
and highlight_level_offset
parameters. Small adjustments can make a significant difference in the resulting masks.mask
parameter to focus the shadow and highlight detection on specific areas of your image. This can be particularly useful for complex compositions where you only want to adjust certain parts of the image.shadow_range
or highlight_range
are outside the acceptable range of 0.01 to 0.99. - Solution: Ensure that the values for these parameters are within the specified range.© Copyright 2024 RunComfy. All Rights Reserved.