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

Image Batch Manager (SuperBeasts.AI)

One node to make every frame the same size, capped and reordered

By SuperBeastsAI·Created 2 years ago·Updated 2 months ago· 220
Image Batch Manager (SuperBeasts.AI)
    • IMAGE
    • STRING
    width512
    height768
    max_images10
    random_orderfalse
    new_manual_order

    Generated video frames come out of a sampler at all sorts of resolutions and in an order you don't always want. Image Batch Manager exists to do the boring, necessary cleanup: resize and center-crop every frame to one exact width×height, cap the batch at a maximum count, and reorder the frames - randomly, or in an order you specify. The SuperBeasts pack is built around video, and this is the "make everything tidy before it hits the next stage" node.

    The resize behavior is worth flagging right away because it surprises people: there's no aspect-ratio-preserve setting. The pack's docs are explicit - it simply crops and resizes to maximize image coverage of your target dimensions. If your target aspect ratio doesn't match the source, you get a center crop and some content goes away. That's a feature for video (you need exact dims for a consistent pipeline) but it means you shouldn't feed it a 16:9 photo and ask for 1:1 without expecting to lose the edges.

    How it works

    The node starts with a required image1 input, then - thanks to a small JavaScript extension that ships in the pack - sprouts image2, image3, and so on as you connect more images. That's the "unlimited inputs" thing you'll see in the docs. Then:

    1. Each input frame is resized to fill the target width/height (scaling to the larger dimension), then center-cropped to the exact target. Bilinear resize, so it's fast.
    2. max_images (default 10) truncates the batch - only the first N frames survive.
    3. Ordering is applied last. random_order shuffles the frames; new_manual_order takes a comma-separated, 1-based list like 3,1,2 and rearranges accordingly.

    The output is two things: the processed IMAGE batch, and a STRING containing the order as CSV (handy if you need to know which original frame ended up where, or if a downstream node wants the sequence).

    The inputs that matter

    • width / height (defaults 512×768) - the exact output size. Match these to whatever your next node expects.
    • max_images - your safety cap. Handy when a wildcard or list loader feeds you more frames than you planned for.
    • new_manual_order - the comma list for manual reordering. This and random_order are the actual "reorder" controls; the STRING output just echoes what happened.

    Where it fits

    Typical slot: right after your batch-generation node (or a frame loader), before anything downstream that demands uniform dimensions - an upscaler, an interpolation pass, an encode step. It's the same idea as the pack's Mask Batch Manager, but for images instead of masks, and with the extra max_images cap and shuffle.

    Install

    Same pack as all the SuperBeasts nodes:

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

    Restart ComfyUI. ComfyUI Manager will find it if you search "SuperBeasts". No extra dependencies.

    Common issues

    The center-crop behavior is the #1 gotcha - people assume resize-to-fit and lose composition instead. If you're getting cropped heads or lost edges, your source aspect ratio doesn't match width/height, and that's by design. Also note the manual order list is 1-based and silently skips any index out of range, so 9,1 on a 4-image batch just gives you frame 1. And keep the JS extension working - the dynamic inputs (and random_order's auto-fill of the order field) come from js/superbeasts.js, so if you installed the pack in an odd way and the dynamic sockets never appear, check that the pack's JS loaded.

    CategorySuperBeastsAI/Image

    Inputs (5)

    NameTypeDefaultDescription
    widthINT512
    heightINT768
    max_imagesINT10
    random_orderBOOLEANfalse
    new_manual_orderoptSTRING

    Outputs (2)

    NameTypeDescription
    IMAGEIMAGE
    STRINGSTRING