Nodes/ComfyUI-Apt_Preset/create_image_batch
ComfyUI Node

create_image_batch

Stacking a variable number of images into one batch

By cardenluo·Created 2 years ago·Updated 18 days ago· 309
create_image_batch
    • IMAGE

    Core ComfyUI's batching options assume you know your image count up front or are pulling from a folder. create_image_batch is the loose, manual version: wire in however many individual images you have sitting around the graph, and get one IMAGE batch out.

    What it is and why you'd reach for it

    This is one of ComfyUI-Apt_Preset's data utility nodes, and like its siblings create_any_batch and create_mask_batch, it declares no fixed inputs in its schema - just an IMAGE output. That's the signature of a dynamic-input node: instead of a fixed number of image sockets, you add exactly as many as you need through the node's own UI (typically a "+" control on the node body), a pattern common across the ComfyUI ecosystem for combine/batch nodes. Reach for this when you've generated or loaded a handful of separate images at different points in your graph and need them combined into a single batch tensor for a downstream node that operates on batches - a batch preview, a batch save, or anything that expects an IMAGE with more than one frame stacked in it.

    How it works

    With no static inputs declared, the mechanism is entirely UI-driven: add input slots on the node as needed, wire an image into each, and the node stacks them together in the order you connected them into one IMAGE batch output.

    Inputs and outputs that matter

    The fixed schema has no required or optional fields - everything is added dynamically through the node's own interface. The one documented piece is the output:

    • IMAGE - the stacked batch of every image you wired in.

    There's nothing to name on the input side beyond "however many image slots you add" - that's the honest description given what the schema actually declares.

    Installing it

    Through ComfyUI Manager: search ComfyUI-Apt_Preset, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
    

    Run install.bat on Windows for dependencies; on Linux/Mac install the requirements yourself, since no bundled script covers those platforms. No model downloads needed - this is tensor stacking, not inference.

    Common issues

    The one real gotcha with any manual image-batch node: every image you feed in needs to match in dimensions (and typically channel count) for the stack to succeed, since a batch tensor requires uniform shape across all its entries. If this node errors out on you, mismatched resolutions between your source images is the first thing to check - resize or crop them to match before batching if they came from different generation steps or different source files.

    If you're not seeing anywhere to add an input, look for a small control directly on the node body rather than expecting sockets to be pre-populated - dynamic-input nodes in this pack start with zero slots until you add them.

    As with the rest of ComfyUI-Apt_Preset: it's a large, actively-updated pack, and at least one user has reported an IMPORT FAILED error at ComfyUI startup after installing it. Check the console log if this node doesn't show up after install - it usually names the missing dependency directly.

    CategoryApt_Preset/data

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE