ComfyUI > Nodes > ComfyUI-UniversalToolkit > Mask Add (UTK)

ComfyUI Node: Mask Add (UTK)

Class Name

MaskAdd_UTK

Category
UniversalToolkit/Mask
Author
whmc76 (Account age: 1110days)
Extension
ComfyUI-UniversalToolkit
Latest Updated
2026-03-16
Github Stars
0.07K

How to Install ComfyUI-UniversalToolkit

Install this extension via the ComfyUI Manager by searching for ComfyUI-UniversalToolkit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-UniversalToolkit 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Mask Add (UTK) Description

Performs pixel-wise addition of two mask images, clamping results between 0 and 1 for valid output.

Mask Add (UTK):

The MaskAdd_UTK node is a powerful tool designed to perform pixel-wise addition of two mask images, which are often used in image processing and AI art creation to define areas of interest or exclusion. This node is particularly useful when you need to combine two masks to create a composite mask that highlights areas covered by either of the original masks. The addition operation is performed on a per-pixel basis, and the resulting values are clamped between 0 and 1 to ensure that the output remains a valid mask. This functionality is essential for tasks that require blending or merging mask data, allowing for more complex and nuanced image manipulations. By using this node, you can efficiently manage and manipulate mask data to achieve desired artistic effects or to prepare images for further processing.

Mask Add (UTK) Input Parameters:

mask1

mask1 is the first input mask that you want to add to another mask. It serves as one of the two primary components in the addition operation. The mask should be a binary or grayscale image where pixel values typically range from 0 to 1, representing the degree of masking. This parameter is crucial as it defines one half of the data that will be combined to form the output mask. Ensure that the dimensions of mask1 match those of mask2 to avoid errors during processing.

mask2

mask2 is the second input mask that will be added to mask1. Like mask1, it should be a binary or grayscale image with pixel values ranging from 0 to 1. This parameter complements mask1 in the addition operation, and together they determine the final output mask. The dimensions of mask2 must match those of mask1 to ensure a successful operation. The combination of these two masks allows for the creation of a new mask that incorporates features from both inputs.

Mask Add (UTK) Output Parameters:

mask

The output parameter mask is the result of the pixel-wise addition of mask1 and mask2. This output is a new mask where each pixel value is the sum of the corresponding pixels in the input masks, clamped between 0 and 1. This ensures that the output remains a valid mask suitable for further processing or direct use in image manipulation tasks. The resulting mask effectively combines the areas of interest from both input masks, providing a versatile tool for complex masking operations.

Mask Add (UTK) Usage Tips:

  • Ensure that both input masks, mask1 and mask2, have the same dimensions to avoid errors and achieve the desired output.
  • Use this node to blend masks when you want to highlight areas covered by either mask, which can be particularly useful in compositing tasks.
  • Consider the clamping effect when interpreting the output, as pixel values will be restricted to the range of 0 to 1, which may affect the intensity of the combined mask.

Mask Add (UTK) Common Errors and Solutions:

输入的两个MASK尺寸不一致

  • Explanation: This error occurs when the dimensions of mask1 and mask2 do not match, preventing the node from performing the addition operation.
  • Solution: Ensure that both input masks have the same width and height before connecting them to the node. You may need to resize one of the masks to match the other.

Mask Add (UTK) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-UniversalToolkit
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Mask Add (UTK)