Nodes/WtlNodes/Mask Combiner
ComfyUI Node

Mask Combiner

Preview different-sized masks and hand them out as a list, intact

By Scorpiosis0·Created 10 months ago·Updated 2 months ago· 3
Mask Combiner
  • mask_1
  • mask_2
  • masks

WtlMaskCombiner is the mask twin of the pack's Image Combiner, and the name tells you everything: it combines masks into a list while letting every one keep its original dimensions. No cropping, no resizing, no forced uniformity. Connect mask_1, mask_2, and keep going - new slots appear as you connect them, same dynamic input pattern as the batch/combiner family - and the node previews the whole pile in RAM while also handing it out.

The output is a MASK list (OUTPUT_IS_LIST under the hood). Each mask stays exactly as big as it was when it went in, so a 512×512 region mask and a 1024×1024 one can ride the same list without either being mangled. That's the defining contrast with the pack's Mask Batch node, which stacks everything into a single tensor and center-crops to the first mask's size. One sentence to keep them straight: Batch = one cropped tensor, Combiner = a size-preserving list.

The other half of the job is inspection. The node is an output node - it previews all the masks together in its panel, RAM-only, no disk I/O - but unlike a pure preview it also emits the list, so it's not stuck being a dead end. If you're assembling a set of region masks that need eyeballing before they feed something like a batch filter or a multi-mask compositor, this both shows you what you've got and forwards it in the shape downstream list-expecting nodes want.

Two practical notes. First, "preview in RAM only" means the rendered preview lives in the browser session - it never writes to output/, so don't go looking for files afterward. Second, because it outputs a list rather than a single stacked tensor, a downstream node that expects one uniform MASK batch won't accept it directly; if that's your destination, reach for Mask Batch instead. The choice between the two is entirely "what does the next node eat."

It ships in the WtlNodes pack (Scorpiosis0/ComfyUI-WtlNodes). Install via ComfyUI Manager by searching "WtlNodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Scorpiosis0/ComfyUI-WtlNodes.git

then restart ComfyUI. Deps: numpy, scipy, pillow. No models, no keys, nothing to download.

The pattern across this pack is consistent, which is its strength: Image Batch/Combiner and Mask Batch/Combiner are the same design applied to the two tensor types. Learn the pair and you've learned four nodes.

CategoryWtlNodes/mask

Inputs (2)

NameTypeDefaultDescription
mask_1MASK
mask_2MASK

Outputs (1)

NameTypeDescription
masksMASK