πΈ Mask Batch Split
The tiny node that turns a mask batch into individual masks
- mask_batch
- mask_1
- mask_2
- mask_3
Frog Mask Batch Split is a two-inch piece of plumbing that makes multi-character detailing possible. When πΈ Florence2+SAM Masker runs in separate mode, it outputs every detected face as a single batched mask tensor shaped [N, H, W] - all of them bundled into one wire. Most nodes can't use that: a detailer's face_mask input expects one mask for one character. This node splits the batch apart into mask_1, mask_2, and mask_3, so each character's face can be routed to its own pass.
Why bother? Because the whole point of the pack's per-character detailer design is isolation. Feed each character's mask into its own face_mask, face_mask_2, or face_mask_3 input on πΈ Detailer, and each face gets processed as an independent pass with its own sampled eye color - no cross-contamination between two characters sharing a canvas. The README calls this out explicitly: the separate mode exists "for multi-character eye-colour isolation," and Mask Batch Split is the adapter that turns that batch into something the detailer can address individually.
The input
Just one: mask_batch - the [N, H, W] batched mask from FloSAM Masker in separate mode. The tooltip says it plainly: "Each slice becomes one output mask." Slices come out in detection order, so mask_1 is the first face Florence2 found, mask_2 the second, and so on.
What comes out
mask_1, mask_2, mask_3 - up to three individual MASK outputs, each a single face mask ready for a detailer or any mask-consuming node. If the batch has fewer than three slices, the empty slots simply don't fire; there's no padding error, the unused outputs are just not produced.
Installing it
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/RabbitThatIsPink/FrogNodePack
or ComfyUI Manager β "Frog Node Pack". No extra dependencies.
Where people trip
The honest caveat: this is a WIP node, which mostly means "don't build a hundred-workflow empire on it yet." The practical trap is ordering. mask_1 is whichever face Florence2 detected first, not necessarily the character you think of as "character 1" - if your detailer keeps fixing the wrong face, check which mask is which by previewing them, or reorder at the source. And if you feed it a non-batched single mask by mistake, you'll get one output where you expected a split; the node doesn't merge or duplicate, it slices. Keep it between FloSAM's separate mode and the Detailer's per-character inputs and it does exactly one job, quietly.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| mask_batch | MASK | Batched mask [N, H, W] from πΈ Florence2+SAM Masker in 'separate' mode. Each slice becomes one output mask. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mask_1 | MASK | β |
| mask_2 | MASK | β |
| mask_3 | MASK | β |