ComfyUI > Nodes > ComfyUI_XISER_Nodes > Mask Batch Processor

ComfyUI Node: Mask Batch Processor

Class Name

XIS_MaskBatchProcessor

Category
XISER_Nodes/Image_And_Mask
Author
grinlau18 (Account age: 944days)
Extension
ComfyUI_XISER_Nodes
Latest Updated
2026-03-20
Github Stars
0.03K

How to Install ComfyUI_XISER_Nodes

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

Batch process masks with union, intersection, subtraction for efficient, creative image editing.

Mask Batch Processor:

The XIS_MaskBatchProcessor is a powerful node designed to handle batch processing of masks, offering operations such as union, intersection, and subtraction. This node is particularly beneficial for AI artists who need to manipulate multiple masks simultaneously, allowing for complex image editing tasks to be performed efficiently. By providing the ability to combine masks in various ways, it enhances the flexibility and creativity in digital art projects. The node's primary goal is to streamline the process of mask manipulation, making it easier to achieve desired visual effects without requiring extensive technical knowledge.

Mask Batch Processor Input Parameters:

masks

This parameter represents the batch of masks that you want to process. It is crucial as it serves as the primary input for the node's operations. The masks should be provided as a tensor, and the node will handle them according to the specified operation. The batch size is determined by the number of masks provided, and it is essential to ensure that the masks are correctly formatted and within the valid range of values, typically clamped between 0 and 1.

operation

The operation parameter dictates the type of processing to be applied to the batch of masks. You can choose from three options: "union," "intersection," and "subtract." The "union" operation combines masks by taking the maximum value across the batch, effectively merging them. The "intersection" operation takes the minimum value, highlighting common areas across masks. The "subtract" operation removes one mask from another, useful for creating cut-out effects. The default operation is "union," and selecting the appropriate operation is crucial for achieving the desired outcome.

invert_output

This boolean parameter determines whether the output mask should be inverted. By default, it is set to False, meaning the output will be as processed. If set to True, the resulting mask will be inverted, flipping the mask values. This can be particularly useful when you need to reverse the mask's effect, such as turning a selection into a deselection or vice versa.

Mask Batch Processor Output Parameters:

processed_mask

The processed_mask is the output of the node, representing the result of the batch processing operation applied to the input masks. This output is a single mask that reflects the combined effect of the specified operation and any inversion applied. It is crucial for further image processing tasks, as it can be used to mask or highlight specific areas of an image. The processed mask is clamped to ensure valid values, typically between 0 and 1, ensuring compatibility with subsequent processing nodes.

Mask Batch Processor Usage Tips:

  • Ensure that all input masks are correctly formatted and within the valid range to avoid unexpected results.
  • Experiment with different operations to understand their effects on the masks and choose the one that best suits your artistic needs.
  • Use the invert_output option to quickly reverse mask effects, which can save time in complex editing workflows.

Mask Batch Processor Common Errors and Solutions:

Empty mask batch received

  • Explanation: This error occurs when the input batch of masks is empty, meaning no masks were provided for processing.
  • Solution: Ensure that you provide a valid batch of masks as input. Check that the masks are correctly loaded and passed to the node.

Mask has invalid dimensions

  • Explanation: This error indicates that the input masks do not have the expected dimensions, which can prevent proper processing.
  • Solution: Verify that the masks have the correct dimensions, typically (N, H, W) for batch processing, and adjust them if necessary to match the expected format.

Mask Batch Processor Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_XISER_Nodes
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 Batch Processor