Visit ComfyUI Online for ready-to-use ComfyUI environment
Combine mask images by adding pixel values to create composite masks, highlighting areas of interest while preventing overflow/underflow.
The Masks Add node is designed to combine two mask images by adding their pixel values together. This operation is particularly useful in image processing and AI art creation, where you might want to merge different mask regions to create a composite mask. By adding the masks, you can highlight areas of interest from both input masks, effectively combining their features. This node ensures that the resulting mask values are clamped within a valid range, preventing any overflow or underflow issues. The main goal of this node is to facilitate the creation of complex masks by leveraging the additive properties of the input masks.
This parameter represents the first mask to be added. It is a tensor of type MASK
. The mask should be a multi-dimensional array where each element corresponds to a pixel value. The values in this mask will be added to the corresponding values in the second mask. This parameter is crucial as it forms one half of the input for the addition operation.
This parameter represents the second mask to be added. Similar to masks_a
, it is a tensor of type MASK
. The values in this mask will be added to the corresponding values in the first mask. This parameter is equally important as it forms the other half of the input for the addition operation.
The output parameter MASKS
is a tensor of type MASK
. This represents the resulting mask after the addition of masks_a
and masks_b
. The values in this mask are clamped to ensure they remain within a valid range, typically between 0 and 255. This output is essential for further image processing tasks, as it combines the features of the input masks into a single composite mask.
masks_a
and masks_b
, are of the same dimensions to avoid any shape mismatch errors.masks_a
and masks_b
have different dimensions.MASK
.MASK
. Convert any other data types to the appropriate format before using the node.© Copyright 2024 RunComfy. All Rights Reserved.