A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
The "LayerUtility: ImageBlend V2" node is a blend utility for image manipulation within the ComfyUI framework. It is designed to merge a foreground layer onto a background image using a specified blend mode and opacity setting. This node allows for customizable blending effects between two images, potentially including an optional mask for more controlled blending.
layer_image
(foreground) with a background_image
using different blend modes determined by the blend_mode
parameter.opacity
input, ranging from fully transparent to fully opaque.layer_mask
that can influence the blending process by defining which parts of the layer image are visible.Background Image: The base image onto which the layer image will be blended. It must be provided.
Layer Image: The image that will be superimposed onto the background. It must be provided.
Invert Mask: A boolean input with a default value of True
. This determines whether the optional mask is inverted during processing.
Blend Mode: Specifies the method used to blend the images. Various modes can be chosen to achieve different effects.
Opacity: An integer input ranging from 0 to 100. This sets the transparency level of the blend, with 0 being fully transparent and 100 being fully opaque.
The LayerUtility: ImageBlend V2 node can be integrated into a ComfyUI workflow where image compositing is required. It is particularly useful in designs that involve layered graphics, artistic compositions, or enhancements where two images need to be merged seamlessly. Workflows may include:
Batch Processing: The node is capable of processing batches of images concurrently, automatically accommodating the largest batch input.
Error Handling: The node includes a basic mechanism for managing mismatches in mask and layer sizes, defaulting to a full-size white mask if discrepancies are found.
Performance: As the node leverages PyTorch for tensor operations, it is optimized for high-performance image processing tasks.
Flexibility: With customizable blend modes and opacity settings, the node offers significant flexibility in how images are merged, allowing for a wide range of creative outputs.
This node is part of the experimental and utility nodes category (dzNodes/LayerUtility) within ComfyUI, indicating its usefulness for dynamic and diverse image processing applications.