Batch From Latent Image
Repeat One Latent Into a Whole Batch — the Seed Stays the Same, Heads Up
- latent
- LATENT
Batching in ComfyUI means sampling several images in one pass. To get there you usually need several latents on one wire, and this node is the simple way: it takes a single latent and repeats it batch_size times into a batch. The author's description calls it what it is - a way to create a new batch "to be denoised via sampling."
Why you'd reach for it
Three real uses. First, variation work: with a batch of N identical latents, anything that varies per batch item - a different seed per slot, a wildcard prompt that randomizes per row, a different conditioning - gives you N different outputs in one sampler run. Second, it's the natural partner for the pack's KSampler For Each, which samples a batch serially to fit in small VRAM; this node builds the batch, that node chews through it one at a time. Third, plain throughput: if your workflow already varies something per item, repeating the latent is all you need to turn "one image" into "N images."
How it works
It takes the input latent's samples, reshapes them to a single-element batch, and repeats them along the batch dimension. The honest gotcha is right in the mechanism: the copies are identical. Repeating a latent does not give you a different seed per copy - the seed lives in the sampler, and a plain batch like this shares one seed across all items. So if you repeat a latent and run a plain sampler, you get N copies of the same image. To actually get variation you need a node that feeds a different seed per batch index, or prompt variation per item.
Inputs and outputs
- latent - the latent to repeat ("The latent image to denoise," per the author's tooltip).
- batch_size - 1 to 4096, default 1.
Output: LATENT, the repeated batch.
Installing it
Part of "quadmoon's ComfyUI nodes". ComfyUI Manager: search the pack title or Install via GIT URL with https://github.com/traugdor/ComfyUI-quadMoons-nodes.git. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/traugdor/ComfyUI-quadMoons-nodes.git
Restart ComfyUI. No models or dependencies.
Common issues
The "all N images look identical" moment is the big one, and it's not a bug - it's the shared seed. If you expected a batch of variations and got a batch of clones, you need per-item seed or prompt variation in the graph. Also, if you're building the batch from an empty latent, remember the content still comes entirely from the sampler's noise: repeating a blank latent N times and sampling with different seeds gives N distinct images, which is the most common and most useful pattern for this node.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | The latent image to denoise. | |
| batch_size | INT | 11–4096 | The number of latent images in the batch. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | The empty latent image batch. |