A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
The "LayerStyle: GradientOverlay V2" node is a feature of the ComfyUI framework that allows users to apply advanced gradient overlay effects to images. This node facilitates creative image manipulation by blending an overlay with a specified gradient onto a base image (background image) using various parameters and configurations.
This node processes one or more input images, referred to as the background and layer images, and applies a gradient overlay based on specified start and end colors, opacity settings, blending modes, and other customizable options. It may also be influenced by an optional mask that defines which areas of the layer image are visible.
The "LayerStyle: GradientOverlay V2" node accepts the following inputs:
Background Image: The base image over which the gradient overlay is applied. This input is required.
Layer Image: The image to which the gradient is applied before being blended onto the background. This input is also required.
Invert Mask: A boolean option that determines whether the optional mask should be inverted. The default setting is true, meaning the mask is inverted by default.
Blend Mode: The blending method used to combine the layer image with the gradient. It utilizes different algorithms to achieve various artistic effects.
Opacity: An integer value ranging from 0 to 100 that controls the transparency level of the overlay effect. The default value is 100, indicating full opacity.
Start Color: A string representing the hex code of the starting color for the gradient. The default is #FFBF30
.
Start Alpha: An integer value between 0 and 255, which specifies the starting transparency of the gradient. The default is 255 (fully opaque).
End Color: A string representing the hex code of the ending color for the gradient. The default is #FE0000
.
End Alpha: This integer value, also between 0 and 255, specifies the ending transparency of the gradient. The default is 255 (fully opaque).
Angle: An integer value from -180 to 180 degrees that controls the direction of the gradient across the layer image. The default is 0 degrees.
Layer Mask (Optional): An optional mask that determines which parts of the layer image are visible and where the gradient overlay should be applied. The mask's presence or absence can alter how the gradient appears on the layer.
The GradientOverlay V2 node can be integrated into diverse ComfyUI workflows to enhance the visual appeal and complexity of processed images. It is particularly useful in scenarios where there is a need to:
Batch Processing: This node handles multiple images simultaneously, ensuring efficiency in bulk image processing tasks within ComfyUI.
Custom Blending Options: By leveraging user-defined blend modes, this node provides flexibility for achieving a wide range of visual styles. The blend mode selected will affect how the gradient interacts with the layer image before integration with the background.
Gradient Control: With adjustable start and end color and transparency values, users have fine-grained control over the gradient's appearance, providing the freedom to tailor the overlay effect to specific creative needs.
Optimal Mask Management: The node intelligently manages optional masks, automatically inverting them when requested and resizing them to fit layer images when necessary, ensuring consistent results without manual intervention.
When using this node, users should be aware of potential size mismatches between the layer image and mask, which may lead to warnings in the processing log. Proper preparation of input images can mitigate this issue and guarantee the desired overlay outcome.