MakeBatch
The pile-everything-into-one-batch node
- *
MakeBatch is the node you reach for when you're tired of running the same generation five times. You feed it several images - or several masks - and it stacks them into one tensor along the batch dimension, returning a single output you can drop straight into a KSampler, a VAE decode, or a preview node. One run, five results, same seed handling, same everything. That's the whole point.
It lives in ComfyPanel, the pack that also ships the Photoshop bridge plugin, but it doesn't care about Photoshop at all - this is a plain, self-contained batch utility you can use in any workflow.
How it works
ComfyUI's frontend gives MakeBatch dynamic input sockets - you'll see input_1, input_2, and so on, and more appear as you connect wires. At execution the node just collects every connected input and does three things in order:
- Reads the first input to figure out whether it's dealing with images or masks (it checks the dtype and value range - masks are uint8-ish or capped at 1.0).
- For every other input, if the spatial size doesn't match the first one, it upscales it with lanczos to match. No separate Scale node needed.
- Concatenates everything along the batch dimension (dim 0) and returns one tensor.
So you can stack a 512×512 and a 768×768 crop without a pre-step, and the output's batch size is the sum of all your inputs' batch sizes. If the resolution already matches, it skips the resize entirely.
That auto-resize is the part that separates it from ComfyUI's core "Batch Images" node - MakeBatch will happily even out mismatched resolutions for you, and it speaks mask tensors too.
Inputs and outputs that matter
There are no widgets to fiddle with. The inputs are the dynamic input_N sockets (wire as many as you need, they're all * type), and the output is a single * tensor. That's the whole surface. Connect images, connect masks, wire the output into a sampler's images input, done.
Where people get burned
Keep one kind per stack. The concat is on the batch axis, so all inputs need the same rank - mixing a 4D image tensor with a 3D mask that already happens to match size will error at torch.cat time. Also keep channel counts consistent: three RGB images plus one RGBA is a crash, not an inconvenience. And since it upscales anything that doesn't match the first input, your batch resolution is whatever input_1 is - connect your smallest or your target-size image first and let the rest get pulled up.
Installing it
It ships in ComfyPanel, so you get the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Ginolazy/ComfyPanel
Restart ComfyUI, or just search ComfyPanel in ComfyUI Manager's Custom Nodes tab and let it handle it. The pack's requirements list kornia, scipy, and opencv-python alongside the usual torch/numpy/Pillow - most installs already have those, and ComfyUI Manager will prompt for anything missing. No model files to download for this node. The custom nodes are MIT-licensed and work standalone; the proprietary Photoshop plugin is a separate install you don't need here.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |