Batch Latents
Gather many latents into one stack
- latents
- LATENT
ComfyUI has an annoying habit: a lot of nodes process a batch of latents, but your graph produces them one at a time. Batch Latents is the collector - it takes however many latents you feed it and stacks them into a single batch along the batch dimension. One input, one output, zero settings. It's the latent version of Batch Images, and it exists because "do this to several latents at once" is the most common way to save VRAM and wall-clock time.
The single input, latents, is the interesting one: it's an autogrow input, meaning the node grows extra input sockets as you connect more latents (up to 50). Connect two latents and you get two sockets; connect eight and you get eight. No "how many" field - you just keep wiring and the node adapts. Output is one LATENT where every input latent occupies a slice of the batch, in the order you connected them.
Why you'd bother
- One sampling pass, many images. You generated three latents through different branches (different subjects, different crops) and want them all denoised in a single KSampler call. Batch them, sample once, decode once. Same for VAE decode - one call instead of three.
- Consistency across the batch. When a node like IPAdapter or a conditioning node applies something per-image, feeding a full batch means it processes all of them with the same settings in one go.
- Grid and variation workflows. Gather the latents from a seed-variation loop, batch, decode, and you have a contact sheet with one decode pass.
The constraints that will actually bite
- All latents must match in shape - except batch. Same height, width, channel count, and temporal/frame structure. A 512×512 latent and a 768×768 latent cannot share a batch; neither can a video latent and a still latent. The node joins along batch only, and mismatches fail loudly.
- Same latent type. An audio latent and an image latent won't stack. This node is for like-with-like.
- It's the modern, flexible sibling of the older LatentBatch node. The classic
LatentBatchhas exactly two fixed inputs; Batch Latents replaces the "what if I have four?" problem with autogrow sockets. New workflows use this one. - Don't confuse it with Repeat Latent Batch. Repeat duplicates one latent N times (same content, more copies). Batch Latents joins different latents. Different jobs, and mixing them up produces "why are all my images identical" (repeat) or "why does it error" (join with mismatched shapes).
The honest verdict
It's the kind of node that looks pointless until you've hit the moment where you need to process a pile of latents in one go and realize the graph has no way to express it. Autogrow inputs are one of ComfyUI's newer conveniences, and Batch Latents is the cleanest example: no count to maintain, no dropdown to set, just wire and go. If you're building anything that generates more than one latent per run, this is the node that keeps the rest of the pipeline from getting multiplied into a dozen parallel copies.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latents | COMFY_AUTOGROW_V3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |