A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
The LayerMask: ShadowHighlightMaskV2
node is designed to generate masks based on shadow and highlight information from input images. This node is part of the ComfyUI framework and is designed to help users isolate and manipulate shadows and highlights within an image using mask layers.
This node is useful in image processing workflows where selective enhancement or modification of image shadows and highlights is required. By generating accurate masks for these areas, users can apply targeted adjustments, enhancing the aesthetic or visual quality of an image.
The LayerMask: ShadowHighlightMaskV2
node accepts several inputs that allow for customizable mask generation:
Image: The primary input image from which shadow and highlight masks will be generated. This input is mandatory.
Shadow Level Offset: An integer value (range: -99 to 99, default: 0) that adjusts the detection level for shadows. This helps in fine-tuning which parts of the image are recognized as shadows.
Shadow Range: A float value (range: 0.01 to 0.99, default: 0.25) that determines the breadth of luminance levels considered as shadows. A broader range includes more variation in shadow luminosity.
Highlight Level Offset: An integer value (range: -99 to 99, default: 0) that alters the detection level for highlights, allowing precise adjustment of highlight identification.
Highlight Range: A float value (range: 0.01 to 0.99, default: 0.25) that defines the span of luminance levels deemed as highlights in the image.
Mask (Optional): An optional input to apply an existing mask to the process, which may influence the resulting shadow and highlight masks.
The LayerMask: ShadowHighlightMaskV2
node provides two outputs:
Shadow Mask: A mask representing the shadowed areas of the input image, based on the specified parameters.
Highlight Mask: A mask indicating the highlighted areas of the image as determined by the node's parameters.
These outputs can then be used for further processing or visual enhancement within other stages of a workflow.
Within ComfyUI workflows, the LayerMask: ShadowHighlightMaskV2
node can be strategically placed to facilitate image modifications that require selective editing. Typical use cases include:
Targeted Adjustments: Apply the generated masks to adjust specific image regions, such as enhancing shadow depth or brightening highlights without affecting other areas.
Compositing and Blending: Use masks for compositing images, blending different layers seamlessly, or isolating certain features for focused editing.
Image Enhancement: Enhance image aesthetics by balancing shadows and highlights, especially in landscape or portrait photography.
Parameter Flexibility: The node offers flexible parameters for shadow and highlight detection, ensuring it can handle various image types and lighting conditions.
Batch Processing: Capable of processing multiple images in one go, making it suitable for batch editing tasks.
Mask Input Influence: When a mask is provided, it serves as a base for processing, which can lead to more refined and context-specific results.
Users should consider the nature of the input images and the desired outcome when deciding the parameter values, as excessive adjustment can lead to unnatural results.
The LayerMask: ShadowHighlightMaskV2
node is ideal for users looking to precisely control shadow and highlight manipulation in their image processing projects.