ComfyUI > Nodes > ComfyUI_XISER_Nodes > Canvas Mask Processor

ComfyUI Node: Canvas Mask Processor

Class Name

XIS_CanvasMaskProcessor

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

Canvas Mask Processor Description

Blends up to 50 mask layers, calculates visibility, and inverts for detailed AI art effects.

Canvas Mask Processor:

The XIS_CanvasMaskProcessor is a versatile node designed to blend multiple masks, supporting up to 50 layers. This node is particularly useful for AI artists who need to manage complex compositions involving multiple overlapping masks. By calculating the visible parts of each mask layer and combining them, it allows for intricate control over the final mask output. The node can also invert the final mask, providing additional flexibility in mask manipulation. This capability is essential for creating detailed and layered visual effects, making it a valuable tool in the digital artist's toolkit.

Canvas Mask Processor Input Parameters:

invert_output

This parameter determines whether the final output mask should be inverted. When set to True, the node will flip the mask values, turning areas that were masked into visible areas and vice versa. This can be particularly useful when you want to quickly switch the focus of your mask without manually adjusting the mask layers. The default value is True, allowing for immediate inversion if needed.

masks

This input accepts a list of masks that you wish to blend. Each mask in the list represents a layer in the composition, and the node will process these layers to produce a single output mask. The masks should be provided in a format compatible with the node's processing capabilities, typically as tensors. The node will handle up to 50 masks, making it suitable for complex projects with multiple layers.

Layer_Mask_1 to Layer_Mask_50

These are optional boolean inputs that allow you to enable or disable specific mask layers in the blending process. Each input corresponds to a specific layer, and by toggling these inputs, you can control which layers are included in the final mask computation. This feature provides granular control over the mask blending process, enabling you to experiment with different layer combinations to achieve the desired effect.

Canvas Mask Processor Output Parameters:

output_mask

The output of this node is a single mask that results from blending the input masks according to the specified parameters. This mask represents the visible portions of the input layers after processing, and it can be used in subsequent nodes or exported for further use. The output mask is clamped to ensure all values are within a valid range, providing a clean and usable result for your projects.

Canvas Mask Processor Usage Tips:

  • Experiment with enabling and disabling different layers using the Layer_Mask inputs to see how each layer affects the final output. This can help you fine-tune the mask for your specific needs.
  • Use the invert_output parameter to quickly switch the focus of your mask, which can be particularly useful when working with complex compositions where the masked and unmasked areas need to be swapped.

Canvas Mask Processor Common Errors and Solutions:

"Invalid mask dimensions"

  • Explanation: This error occurs when the input masks do not have the correct dimensions or format expected by the node.
  • Solution: Ensure that all input masks are provided in the correct format and dimensions, typically as tensors compatible with the node's processing requirements.

"Batch size less than 1"

  • Explanation: This error indicates that the batch size calculated from the input masks is less than 1, which is not valid for processing.
  • Solution: Check that the input masks are correctly formatted and that at least one mask is provided for processing. Adjust the input data to ensure a valid batch size.

Canvas Mask 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.