Batch Processing and Variations
- Set the batch_size parameter in Empty Latent Image to generate multiple images in one pass.
- Configure seed control strategies in the KSampler to produce fixed reproductions and controlled variation series.
- Use an XY Plot node to generate a parameter comparison grid.
Generating Multiple Images in One Run
ComfyUI can generate several images from a single click by setting the batch_size parameter in the Empty Latent Image node. The default is 1. Set it to 4 and the KSampler generates four images simultaneously, each using the same prompt and settings but a different random seed (unless you fix the seed).
Batch generation is efficient because all images in a batch are processed in parallel on the GPU. A batch of 4 takes roughly the same time as generating 4 images sequentially but with significantly higher VRAM usage — approximately proportional to the batch size. A batch of 4 at 512×512 with SD 1.5 uses roughly 4× the base VRAM. Know your VRAM limit before setting high batch sizes.
The output viewer stacks all batch images in a grid. Save Image saves them all as separate files with sequential numbers appended to the filename.
Seed Strategies
The seed controls the random starting point for noise generation. In the KSampler node:
- seed: the actual seed value (any integer). Same seed + same prompt + same settings = same output every time.
- control_after_generate: what happens to the seed after each queue run
The four seed control modes:
- fixed: seed never changes; every run produces identical output. Use this when you want to reproduce or refine a specific generation.
- randomize: picks a new random seed each run; produces different outputs every time. Good for exploration.
- increment: adds 1 to the seed after each run. Produces a controlled series of variations where each image is slightly different from the last in a predictable sequence.
- decrement: subtracts 1 each run; similar to increment but going in the other direction.
For variation exploration: run once with randomize to find a seed you like, then switch to fixed and adjust your prompt or settings to refine that specific generation without losing it.
Using XY Plot for Parameter Comparison
The XY Plot (also called XY Inputs + XY Plot node) is available through the Efficiency Nodes custom node package. It generates a grid of images varying two parameters simultaneously — one parameter on the X axis, one on the Y axis.
Common XY combinations:
- X: CFG values (5, 6, 7, 8) × Y: Steps (15, 20, 25) — find the best quality/speed tradeoff
- X: LoRA weight (0.4, 0.6, 0.8, 1.0) × Y: denoise (0.5, 0.7, 0.9) — calibrate a new LoRA
- X: Sampler (euler, dpmpp_2m, dpmpp_sde) × Y: Scheduler (normal, karras, exponential) — find best sampler for a model
The output is a single combined image showing all the variations in a grid format with labels. This is the fastest way to understand how a parameter affects output without running dozens of separate generations manually.
To install Efficiency Nodes: open ComfyUI-Manager, search "Efficiency Nodes for ComfyUI", and install. Restart ComfyUI to access the XY Plot nodes.
Queue Stacking for Longer Batch Runs
ComfyUI's queue allows you to stack multiple generation jobs. Click "Queue Prompt" multiple times (or hold the button to queue a specific number) to add jobs to the queue. They run sequentially while you do other things. The queue counter at the top right shows pending jobs.
For overnight generation runs: fix your seed to a starting value, set control_after_generate to increment, set your batch size to 1 or 2, and queue 50–100 runs. Each job produces a different seed-based variation. You return to a folder of images ready for review.
The image history panel (press H or click the history icon) shows all images generated in the current session with their generation settings. You can right-click any image in history to load the workflow that produced it — useful for tracing back how a particularly good image was generated.
- Batch size in Empty Latent Image generates that many images simultaneously on the GPU — batch of 4 uses approximately 4x the base VRAM, so know your VRAM limit before increasing beyond 2.
- Fixed seed is for reproduction (same output every run), randomize is for exploration (different every run), and increment is for controlled variation series (each run shifts by one step in seed space).
- XY Plot from Efficiency Nodes generates a comparison grid varying two parameters at once — great for calibrating CFG versus steps, LoRA weight versus denoise, or comparing samplers and schedulers.
- Queue stacking lets you run dozens of jobs unattended — set seed to increment and queue multiple runs to generate a variation series overnight without manual intervention.
- The image history panel (press H) records all images from the current session with their workflow data — you can reload the exact workflow that generated any past image in the session.