Mask Batch Copy
Duplicate a mask batch into two outputs — the splitter you didn't know you needed
- masks
- masks_1
- masks_2
Mask Batch Copy is the simplest node in this pack and it knows it. It takes one mask batch, clones it, and hands you two identical copies out of masks_1 and masks_2. No options, no modes, no settings to fiddle with. If you've ever stared at a graph trying to route one mask tensor into two different branches and wished there were a plain splitter, this is it.
The word "copy" matters here. Each output is a .clone() of the input, so the two branches are independent tensors - downstream nodes that modify a mask in place (or that you think modify it) won't corrupt the other branch. That's the whole safety property, and it's exactly what you want when one copy feeds a preview and the other feeds a conditioning node, or when you're about to do two different edits on the same mask in parallel.
How it works
One function. It promotes 2D masks to 3D, clones the tensor twice, returns both. The code is four lines and there is nothing hidden under the hood - no transform, no copy-on-write magic, no shared memory aliasing. What you wire in is what comes out, twice.
The only input
masks (MASK). That's it. The outputs are masks_1 and masks_2, both identical to the input, in batch order. The node sits in the "YCNode/Mask/Batch" menu, part of the same batch-mask family as Mask From Batch (slices a range out of a batch) and Mask Batch Composite (concatenates batches together). Between the three of them you can split, slice, and rejoin a mask batch any way a workflow demands - Copy is the "fan out" corner of that triangle.
Install
From the ComfyUI-YCNodes pack. ComfyUI Manager → search "ComfyUI-YCNodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-YCNodes
Restart ComfyUI. Standard deps, no model downloads, and it's a tiny node so it loads instantly. Expect it under "YCNode/Mask/Batch".
Gotchas
Honestly there's not much to trip on here. The one thing to remember: it copies the batch reference, so if you only need one copy you're using a node with two required outputs - ComfyUI handles unused outputs fine, but some people find that mildly annoying and reach for a plain Reroute instead. And if your two branches need different masks, this isn't it - there's no per-output editing here. Use it for what it is: a clean, explicit fan-out that keeps your graph readable instead of crossing wires.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| masks | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| masks_1 | MASK | — |
| masks_2 | MASK | — |