ComfyUI > Nodes > ComfyUI-YCNodes > Mask Batch Composite

ComfyUI Node: Mask Batch Composite

Class Name

MaskBatchComposite

Category
YCNode/Mask/Batch
Author
yichengup (Account age: 473days)
Extension
ComfyUI-YCNodes
Latest Updated
2025-06-03
Github Stars
0.02K

How to Install ComfyUI-YCNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-YCNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-YCNodes 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 Batch Composite Description

Concatenate multiple mask batches into a unified composite mask for detailed and precise mask compositions.

Mask Batch Composite:

The MaskBatchComposite node is designed to facilitate the combination of multiple mask batches into a single, unified mask batch. This node is particularly useful in scenarios where you need to merge different mask layers or sets, allowing for more complex and nuanced mask compositions. By leveraging this node, you can efficiently manage and manipulate mask data, ensuring that your creative projects maintain a high level of detail and precision. The primary function of this node is to concatenate two sets of masks along a specified dimension, effectively creating a composite mask that retains the characteristics of the individual inputs. This capability is essential for artists and designers who work with layered mask structures, as it simplifies the process of integrating multiple mask elements into a cohesive whole.

Mask Batch Composite Input Parameters:

masks_1

This parameter represents the first set of masks that you wish to combine. It is crucial that the masks are in the correct shape, typically as a tensor. If the masks are two-dimensional, they will be automatically adjusted to ensure compatibility with the combination process. The input should be a tensor of type MASK, and it is essential for the successful execution of the node.

masks_2

Similar to masks_1, this parameter is the second set of masks that you want to merge with the first. The node ensures that these masks are also in the correct shape, adjusting them if necessary. This input is also a tensor of type MASK, and it plays a vital role in the composite operation, allowing for the seamless integration of multiple mask layers.

Mask Batch Composite Output Parameters:

combined_masks

The output of the MaskBatchComposite node is a single, unified mask batch that results from the combination of masks_1 and masks_2. This composite mask retains the properties of the input masks and is returned as a tensor of type MASK. The combined mask is essential for further processing or application in your creative projects, providing a streamlined and efficient way to handle complex mask compositions.

Mask Batch Composite Usage Tips:

  • Ensure that both input mask sets (masks_1 and masks_2) are in the correct tensor format to avoid shape-related issues during the combination process.
  • Use this node to simplify the management of multiple mask layers, especially when working on projects that require intricate mask compositions.
  • Consider the order of the input masks, as it may affect the final appearance of the combined mask, particularly in cases where the masks have overlapping regions.

Mask Batch Composite Common Errors and Solutions:

Shape Mismatch Error

  • Explanation: This error occurs when the input masks are not in the expected shape, which can prevent the node from successfully combining them.
  • Solution: Ensure that both masks_1 and masks_2 are tensors and have the correct dimensions. If they are two-dimensional, the node will automatically adjust them, but it's best to verify their shape before inputting them into the node.

Invalid Input Type Error

  • Explanation: This error arises when the inputs provided are not of the MASK type, which is required for the node to function correctly.
  • Solution: Double-check that both input parameters are tensors of type MASK. Convert any non-tensor inputs to the appropriate format before using the node.

Mask Batch Composite Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-YCNodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.