Skip to content
,

ComfyUI Batch Size vs Batch Count: Which to Use and How Seeds Work

8–12 minutes
Woman in a glass-walled office holding a tablet with a BATCH SIZE card, hook batch size vs batch count

Want 8 images from one prompt in ComfyUI? You can set batch_size to 8 on the Empty Latent Image, or set the number next to the Run button to 8. Both give you 8 images, but they work very differently.

One runs all 8 at once on your GPU. The other queues 8 separate jobs. Pick the wrong one and you either run out of VRAM or wait longer than you need to.

This guide explains batch size vs batch count in ComfyUI: what each does, which is faster, how much VRAM each needs, how seeds work inside a batch, how to recreate one image from a batch, and the nodes that split, repeat and rebatch latents.

TL;DR

  • Batch size (Empty Latent Image batch_size): N images in one run, side by side in VRAM. Faster per image if you have spare VRAM.
  • Batch count (the number next to Run): N separate runs in the queue. Same VRAM as one image, and a new seed each run if the seed is set to increment or randomize.
  • Low VRAM or big images: batch size 1, batch count N.
  • Seeds in a batch: one seed makes the noise for the whole batch, so image 3 can’t be remade with the seed alone at batch size 1.
  • Remake one image: Latent From Batch (batch_index = its position, length 1) before the KSampler, same seed.

New to ComfyUI? Start with my ComfyUI guide, which covers install, nodes and workflows in one place.

Batch Size vs Batch Count at a Glance

Batch size Batch count
Where you set it batch_size on Empty Latent Image (1 to 4096) The number box next to the Run button
What happens One run makes N images together The workflow is queued N times
VRAM use Grows with N Same as one image
Speed Often faster per image, if VRAM allows Steady, no VRAM risk
Seeds One seed for the whole batch Each run uses the seed widget’s value, which can change between runs
Can you cancel halfway? No, cancelling stops the whole batch Yes, remove the remaining jobs from the queue
Best for Quick variations on a strong GPU Large numbers of images, low VRAM, big resolutions

Batch Size: How It Works

The Empty Latent Image node has three inputs: width, height and batch_size. Its tooltip says it plainly: batch size is “the number of latent images in the batch.”

Set it to 4 and the node makes one latent tensor that holds 4 blank images. The KSampler then denoises all 4 in the same pass, with the same prompt and settings. VAE Decode turns them into 4 images, and Save Image writes 4 files.

  • All 4 images share one prompt, one seed, and one set of sampler settings.
  • Each image still looks different, because each gets its own slice of noise.
  • All 4 sit in VRAM at the same time during sampling and decoding.

The SD3 and video latent nodes have a batch_size input too, and it works the same way.

Batch Count: How It Works

Batch count isn’t a node setting. It’s the number next to the Run button in the ComfyUI menu (older interfaces showed it as Batch count under Extra options).

Set it to 4, click Run, and ComfyUI adds the workflow to the queue 4 times. Each job runs on its own, one after another, so VRAM use is the same as a single image.

What changes between jobs is controlled by the seed widget’s control after generate setting on your KSampler:

control after generate Result with batch count 4
randomize 4 different images with random seeds
increment Seeds 100, 101, 102, 103: different images you can find again easily
decrement Seeds counting down
fixed The same image 4 times (ComfyUI caches the result, so later runs may finish instantly)

The queue lets you see and cancel waiting jobs. That’s handy when you queue 50 images and realise after 3 that the prompt is wrong.

Which Is Faster?

A GPU does more work per second when it has more to do at once, up to a point. Batch size takes advantage of that. Batch count doesn’t, but it adds no extra memory.

  • Small images on a big GPU (SD 1.5 at 512 px on 16 GB or more): batch size 4-8 is noticeably faster per image than batch count.
  • SDXL at 1024 px on 12-16 GB: batch size 2-4 may help a little. Test it.
  • Large images, Flux-style models or 8 GB cards: the GPU is already full with one image. Batch size gives little or no speed-up and risks out-of-memory errors. Use batch count.

The simple test: time batch size 1 x count 4 against batch size 4 x count 1 on the same seed settings. Keep whichever finishes first without errors. The speed tips in my speed up ComfyUI guide apply to both.

Watch VAE Decode too. Decoding a batch needs memory for every image at once. If sampling works but the decode crashes, switch to VAE Decode (Tiled).

How Seeds Work in a Batch

This is the part most people miss.

ComfyUI makes the starting noise with the seed you set. For a batch, it creates the noise for every image in one go from that one seed.

In ComfyUI’s code, the KSampler calls prepare_noise(latent, seed, batch_inds), which generates noise slices in order: slice 0 for image 1, slice 1 for image 2, and so on.

That has two effects:

  1. Image 1 of a batch matches a single image with the same seed. The first slice is the same noise you’d get at batch size 1.
  2. Image 3 of a batch doesn’t match any seed on its own. Setting the seed and batch size 1 gives you image 1, not image 3.

The saved PNG’s workflow records the seed and batch size, not the image’s position. So if you love image 3, you need the trick below to get it back. GPU maths can also differ very slightly between batch sizes, so a recreated image can have tiny pixel differences.

Recreate One Image from a Batch

Latent From Batch picks images out of a batch. It also remembers their positions, and the KSampler uses that to generate the matching noise.

Empty Latent Image (batch_size 4) → Latent From Batch (batch_index 2, length 1) → KSampler (same seed) → VAE Decode → Save Image
  1. Load the workflow from the batch image (drag the PNG onto the canvas).
  2. Add Latent From Batch between Empty Latent Image and the KSampler.
  3. Set batch_index to the image’s position, counting from 0. The third image is index 2.
  4. Set length to 1.
  5. Keep the same seed, set the seed to fixed, and queue.

You now get just that image, which you can send into a hires fix or upscale pass without regenerating the whole batch. A negative batch_index counts from the end, so -1 is the last image.

Batch Nodes You Should Know

Node What it does Key inputs
Latent From Batch Takes images out of a latent batch, keeping their noise positions batch_index, length (1-64)
Repeat Latent Batch Copies a latent N times, for example one encoded photo into 4 variations amount (1-64)
Latent Batch Joins two latent batches into one samples1, samples2
Batch Images Joins two image batches (resizes the second to match) image1, image2
Rebatch Latents / Rebatch Images Splits a big batch into smaller batches that run one after another batch_size
LatentBatchSeedBehavior random gives each image its own noise, fixed gives every image the same noise seed_behavior

LatentBatchSeedBehavior set to fixed is useful for comparisons. Give every image in a batch the same noise, then vary something else (like a LoRA strength or prompt through a list) so the only difference is the thing you changed.

Rebatch is the safety valve for big jobs. If a node hands you 32 images and VRAM can’t handle them together, Rebatch Latents with batch_size 4 runs them 4 at a time.

Batches for img2img and Upscaling

For variations of one photo, encode it once, then use Repeat Latent Batch with amount 4 before the KSampler at denoise 0.4-0.6. Each copy gets different noise, so you get 4 variations. My img2img guide covers the denoise values.

For many different photos, don’t build a batch. Batches force every image to the same size. Load the folder as a list instead, so ComfyUI runs each photo on its own at its own size. See how in my batch process a folder guide.

A Note on Video Models

Video latent nodes usually have both length (frames) and batch_size. Length is the number of frames in one video. Batch size is the number of separate videos.

Leave batch size at 1 for video. A single 81-frame Wan clip already fills most consumer GPUs, and a batch of 2 doubles that. Use batch count to make several takes. My image to video guide has working Wan and LTX settings, and the save video guide covers exporting each take.

Troubleshooting

Out of memory with batch size above 1

Drop batch size to 1 and raise batch count instead. If it fails only at decode, use VAE Decode (Tiled). My CUDA out of memory fix has more options.

Batch count gives the same image every time

The seed is set to fixed, so ComfyUI repeats (or reuses) the same result. Set control after generate to randomize or increment.

All images in my batch look identical

A LatentBatchSeedBehavior node set to fixed is in the chain, or a custom noise node is giving every image the same noise. Remove it or set it to random.

I can’t find the seed of image 3

There isn’t one. Use the batch seed with Latent From Batch at index 2.

Only one image was saved

Check Save Image is connected after VAE Decode, and that no Latent From Batch or Image From Batch node with length 1 sits in the chain.

FAQ

What is batch size in ComfyUI?

The number of images made together in one run, set on the Empty Latent Image node. They share one prompt and seed but each gets different noise.

What is batch count in ComfyUI?

How many times the workflow is queued when you press Run. Each run is a separate job.

Is batch size faster than batch count?

Often yes for small images on GPUs with spare VRAM. For large images or low-VRAM cards the speed is similar, and batch size risks running out of memory.

What’s the maximum batch size?

The node allows up to 4096, but your VRAM is the real limit. Most people stay between 1 and 8.

Do images in a batch have different seeds?

No. They share one seed, and each image uses a different part of the noise made from it.

How do I regenerate one image from a batch?

Add Latent From Batch with the image’s index (starting at 0) and length 1, keep the seed, and run again.

Should I use batch size for video?

Usually not. Keep it at 1 and use batch count for several takes.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a glass-walled office holding a tablet with a BATCH SIZE card, hook batch size vs batch count