Latent Batch Splitter (Inspire)
Break a latent batch into separate outputs
- latent
- LATENT
When you sample with a batch size of 4, ComfyUI hands you one latent that happens to contain four images stacked together. Usually that's fine. But sometimes you want to peel them apart and send each one somewhere different - image 1 to one refiner, image 2 to another, or just to give each its own save path. That's what this node does: it takes a batched latent and splits it into individual latents on separate output wires.
It's the latent-space twin of Inspire's ImageBatchSplitter. Straightforward utility, no drama - the kind of node you don't think about until the day you need to fan a batch out into parallel branches.
How it works
A latent batch is really just a stack of N latents in one tensor. The splitter slices that stack apart. You tell it how many pieces you want with split_count, and it exposes that many separate latent outputs - one per slice. If the incoming batch has more items than split_count, the leftovers don't vanish: per the README, they come back together on a remained output so you can catch or re-process them. If the batch has fewer, the extra output slots just come up empty.
The inputs and outputs that matter
latent- the batched latent you want to break up. Comes straight from a sampler or an Empty Latent with batch size > 1.split_count(default 4, max 50) - how many individual latent outputs to expose. Set it to match your batch size and every image gets its own wire; set it lower and the overflow is returned as the remainder.
The outputs are all of type LATENT - one per split_count, plus the remained output for anything beyond the count. Wire each split output into whatever branch should handle that image.
How to install it
ComfyUI Manager: search ComfyUI Inspire Pack, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Inspire-Pack
then restart. Dr.Lt.Data's pack (ComfyUI-Manager, Impact Pack).
Common issues & troubleshooting
Some output slots are empty. Expected when your batch is smaller than split_count. If you set split_count to 4 but only sampled 2 images, two outputs will be blank. Match split_count to your actual batch size.
Where did the extra images go? If the batch is bigger than split_count, the surplus is returned on the remained output rather than dropped. Grab it there - or raise split_count so every image gets a dedicated slot (up to the max of 50).
I want them as a list, not separate wires. Wrong tool then. This splits into discrete numbered outputs. If you want to iterate over the batch instead, look at Inspire's list nodes and the Foreach system, or just process the batch as-is - most nodes handle a batched latent fine.
Order looks scrambled. The split preserves batch order (item 0 to the first output, item 1 to the second, and so on). If images seem out of order, it's almost always a downstream save/label mismatch rather than the splitter - pair it with a List Counter or explicit filenames to keep track.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| split_count | INT | 40–50 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |