Nodes/ComfyUI-SuperBeasts/Mask Batch Manager (SuperBeasts.AI)
ComfyUI Node

Mask Batch Manager (SuperBeasts.AI)

The mask version of the batch manager — resize, crop and reorder in one go

By SuperBeastsAI·Created 2 years ago·Updated 3 months ago· 220
Mask Batch Manager (SuperBeasts.AI)
    • MASK
    width512
    height768
    new_order

    Mask Batch Manager is the mask-flavored twin of the pack's Image Batch Manager: it takes a batch of masks, resizes and center-crops every one to an exact width×height, and lets you reorder them. In the SuperBeasts pack this is the current, supported tool for that job - it's what the older Make Resized Mask Batch node was replaced by.

    Why would you need this? Masks in a video/inpaint pipeline frequently come out at odd resolutions, or in a frame order that doesn't line up with the images they're supposed to mask. Rather than regenerating them (the expensive option) you just force them all to a uniform size and shuffle them into the right sequence. Same design philosophy as the image version, one key difference: it drops the max_images cap and the random shuffle, and keeps it lean - resize, crop, reorder.

    How it works

    Like its image sibling, it starts with a required mask1 input and grows dynamic mask2, mask3, … sockets as you connect them, via the pack's JavaScript extension. Every mask gets resized to fill the target dimensions and then center-cropped to the exact width/height - again, no aspect-ratio preserving option, so if the source aspect doesn't match the target you lose the edges. That's fine for masks in practice: a subject mask that's slightly off-center still covers the subject, and the uniform size is what actually matters downstream.

    Reordering is the one genuinely extra feature over a plain resize: new_order takes a comma-separated, 1-based list (e.g. 4,1,3,2) and rearranges the batch to match. Leave it empty and the batch passes through in input order. The output is a single MASK tensor, concatenated from all inputs, ready to feed an inpaint or conditioning node.

    The inputs that matter

    • width / height (defaults 512×768) - the uniform output size. Match these to the image batch your masks are paired with, or nothing will line up.
    • new_order - the manual reorder list. This is the whole reason to prefer this node over the deprecated Make Resized Mask Batch.

    Where it fits

    The standard use case is keeping masks in lockstep with frames: generate or load your masks, run them through this to force a uniform size, reorder to match the image sequence, then wire the result into whatever consumes masks - an inpaint pipeline, a video mask conditioning, a per-frame composition. Since it lives in the SuperBeasts pack alongside the video-focused batch tooling, it's clearly aimed at animation/video mask workflows.

    Install

    Standard for this pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SuperBeastsAI/ComfyUI-SuperBeasts
    

    Restart ComfyUI, or install via ComfyUI Manager by searching "SuperBeasts". No extra dependencies beyond what ComfyUI ships.

    Common issues

    The center-crop behavior is the thing to remember - masks get cropped, not letterboxed, and there's no "contain" mode. If a mask's subject is near the edge, the crop can cut it; you're expected to feed it masks that roughly match your target aspect. And the manual order is 1-based with silent skipping of out-of-range indices, so double-check your list. One more note: because the dynamic inputs come from the pack's JS, a broken JS load means you only ever see mask1 - if the extra sockets never appear, that's an install issue, not a node issue.

    CategorySuperBeastsAI/Masks

    Inputs (3)

    NameTypeDefaultDescription
    widthINT512
    heightINT768
    new_orderoptSTRING

    Outputs (1)

    NameTypeDescription
    MASKMASK