🧩 Image Batch Unpack (4-slot)
Fixed lanes for a fixed-size batch
- images
- IMAGE
- IMAGE
- IMAGE
- IMAGE
Fun fact about this node: its README proudly describes it as the "16-slot" unpacker, and the code ships four outputs. The display name - 🧩 Image Batch Unpack (4-slot) - is right, the README is wrong, and it's a good reminder that READMEs rot while code doesn't. ImageBatchUnpack takes a batch and splits it across four fixed output lanes, which makes it the older, less flexible sibling of this pack's dynamic list unpacker.
What it does
One input, images (IMAGE). Four outputs, all IMAGE, each shaped [1, H, W, C] with the original spatial size preserved. The first images in the batch go to lanes 0 through 3, and anything beyond four is simply dropped - there are only four slots.
If the batch has fewer than four images, the leftover lanes get a 1x1 zero tensor instead of nothing. That's a deliberate choice, and a good one: the node could pad missing lanes with full-size black images, but that would waste memory and subtly poison downstream nodes with fake data. A 1x1 placeholder is the smallest thing that keeps the wire connected without pretending to be a real image. Like every node in this pack, it sets INPUT_IS_LIST, so it also flattens list outputs (say, from SEGSPreview) into those same four lanes.
Where it makes sense
The four-lane design exists for one scenario: you know your batch is a fixed size and you want each image to take a different route through the graph. Image 0 goes to a detail pass, image 1 to a save node, image 2 to an upscaler, image 3 to a compare. Fixed lanes mean the routing is readable at a glance - lane 2 is always the third image, always the upscaler, forever.
The flip side is the trap: the moment your batch size is dynamic, this node silently eats the extras. A batch of six becomes four images and two quietly discarded, and the graph won't tell you. If your batch size isn't a rock-solid constant, the ImageBatchUnpackDynamic (List) node in the same pack is the better call - no slot cap, no dropped images. Reach for the 4-slot version only when you can honestly swear the batch will never exceed four.
Install
Standard, boring, painless - which is the pack's brand:
cd ComfyUI/custom_nodes
git clone https://github.com/xuxiao305/ComfyUI-ImageBatchUtils
restart ComfyUI, and all six nodes appear together. Or search ComfyUI-ImageBatchUtils in ComfyUI Manager and install it there. No pip dependencies beyond what ComfyUI already ships, no model downloads, MIT license. Nothing to break.
Gotchas
Two, and they're related. First: the four-slot ceiling - verify your batch size before trusting the lanes. Second: those 1x1 placeholder tensors are still tensors, so a downstream node that isn't careful will happily "process" a 1x1 image and produce garbage instead of an error. Gate your branches on ImageBatchCount if there's any chance the batch comes up short, and use the list-based unpacker for anything that isn't a locked four.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |
| IMAGE | IMAGE | — |