ComfyUI > Nodes > ComfyUI Impact Pack > Pixelwise(MASK + MASK)

ComfyUI Node: Pixelwise(MASK + MASK)

Class Name

AddMask

Category
ImpactPack/Operation
Author
Dr.Lt.Data (Account age: 458days)
Extension
ComfyUI Impact Pack
Latest Updated
2024-06-19
Github Stars
1.38K

How to Install ComfyUI Impact Pack

Install this extension via the ComfyUI Manager by searching for ComfyUI Impact Pack
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Impact Pack in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Pixelwise(MASK + MASK) Description

Combine two masks into a single mask by element-wise addition for enhanced coverage and merging of mask regions.

Pixelwise(MASK + MASK):

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.

Pixelwise(MASK + MASK) Input Parameters:

mask1

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.

mask2

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.

Pixelwise(MASK + MASK) Output Parameters:

MASK

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.

Pixelwise(MASK + MASK) Usage Tips:

  • Use the AddMask node to merge masks from different sources to create a comprehensive mask that covers all desired regions.
  • Adjust the input masks to ensure they are properly aligned and scaled before combining them to avoid misalignment in the resulting mask.
  • Utilize this node in conjunction with other mask operations like GrowMask or InvertMask to refine and enhance the final mask.

Pixelwise(MASK + MASK) Common Errors and Solutions:

TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'

  • Explanation: This error occurs when one or both of the input masks are not provided or are None.
  • Solution: Ensure that both mask1 and mask2 are correctly specified and are valid mask objects before executing the node.

ValueError: operands could not be broadcast together with shapes

  • Explanation: This error happens when the input masks have different shapes or dimensions, making it impossible to perform element-wise addition.
  • Solution: Verify that mask1 and mask2 have the same dimensions. If necessary, resize or crop the masks to match in size before using the AddMask node.

Pixelwise(MASK + MASK) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Impact Pack
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.