Visit ComfyUI Online for ready-to-use ComfyUI environment
Combine two masks into a single mask by element-wise addition for enhanced coverage and merging of mask regions.
The AddMask node is designed to combine two masks into a single mask by performing an element-wise addition operation. This node is particularly useful when you need to merge different mask regions or enhance the mask coverage by combining multiple masks. By adding the values of corresponding pixels from two masks, the resulting mask can highlight areas covered by either of the input masks. This operation is essential in various image processing and AI art tasks where composite masks are required to achieve more complex and detailed masking effects.
This parameter represents the first input mask that you want to combine. The mask should be in a format that the node can process, typically a binary or grayscale image where the mask regions are defined. The values in this mask will be added to the corresponding values in the second mask to produce the final output mask.
This parameter represents the second input mask that you want to combine with the first mask. Similar to mask1
, this mask should be in a compatible format. The values in this mask will be added to the corresponding values in the first mask. The combination of mask1
and mask2
will determine the final mask's coverage and intensity.
The output parameter is a single mask that results from the element-wise addition of mask1
and mask2
. This combined mask will have values that represent the sum of the corresponding pixels from the input masks. The resulting mask can be used in further image processing tasks or as a final mask for rendering or other purposes.
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
None
.mask1
and mask2
are correctly specified and are valid mask objects before executing the node.ValueError: operands could not be broadcast together with shapes
mask1
and mask2
have the same dimensions. If necessary, resize or crop the masks to match in size before using the AddMask node.© Copyright 2024 RunComfy. All Rights Reserved.