ComfyUI  >  Nodes  >  ComfyUI Layer Style >  LayerMask: Shadow & Highlight Mask

ComfyUI Node: LayerMask: Shadow & Highlight Mask

Class Name

LayerMask: Shadow & Highlight Mask

Category
😺dzNodes/LayerMask
Author
chflame163 (Account age: 445 days)
Extension
ComfyUI Layer Style
Latest Updated
6/24/2024
Github Stars
0.6K

How to Install ComfyUI Layer Style

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

LayerMask: Shadow & Highlight Mask Description

Isolate and manipulate shadow and highlight regions of images for targeted adjustments and refined look.

LayerMask: Shadow & Highlight Mask:

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.

LayerMask: Shadow & Highlight Mask Input Parameters:

image

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.

shadow_level_offset

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.

shadow_range

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.

highlight_level_offset

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.

highlight_range

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.

mask

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.

LayerMask: Shadow & Highlight Mask Output Parameters:

shadow_mask

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.

highlight_mask

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.

LayerMask: Shadow & Highlight Mask Usage Tips:

  • To achieve more precise control over shadow and highlight detection, experiment with the shadow_level_offset and highlight_level_offset parameters. Small adjustments can make a significant difference in the resulting masks.
  • Use the 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.
  • Combine the shadow and highlight masks with other nodes or layers to create more complex effects, such as selective color grading or localized sharpening.

LayerMask: Shadow & Highlight Mask Common Errors and Solutions:

"Input image is not in RGB format"

  • Explanation: The node expects the input image to be in RGB format, but the provided image is in a different format.
  • Solution: Convert your image to RGB format before feeding it into the node.

"Invalid range for shadow_range or highlight_range"

  • Explanation: The values for 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.

"Mask dimension mismatch"

  • Explanation: The provided mask does not match the dimensions of the input image.
  • Solution: Make sure that the mask you provide has the same dimensions as the input image to ensure proper processing.

LayerMask: Shadow & Highlight Mask Related Nodes

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