LocalForge AILocalForge AI
BlogFAQ
← Back to Blog

Batch AI Image Generation Locally: Automate Stable Diffusion Workflows in 2026

How to generate hundreds or thousands of AI images automatically on your local machine. Batch prompts, wildcard scripts, X/Y/Z plots, and ComfyUI automation — all offline, all uncensored.

Why Batch Generate?

One-at-a-time generation is for exploration. When you've dialed in your prompt and settings, you want to generate 50, 100, or 1,000 variations and pick the best ones. Or you're building a dataset, creating product shots, or filling a gallery.

On cloud platforms, this costs money per image. Locally, your GPU runs until you tell it to stop — unlimited, uncensored, free.

Method 1: Batch Count in Forge

The simplest approach — built into Forge UI:

  • Batch count: Number of sequential generations. Set to 10, 50, or 100. Each gets a random seed.
  • Batch size: Images generated simultaneously. Set to 2–4 if you have VRAM headroom (each additional image uses ~2 GB more VRAM).
  • Seed = -1: Ensures each image is unique

Batch count 50 with batch size 1 = 50 unique images. Let it run overnight on a budget GPU and wake up to a full gallery.

Method 2: Wildcards (Smart Variation)

Wildcards randomly substitute parts of your prompt each generation:

  1. Install the Wildcards extension in Forge
  2. Create text files in extensions/wildcards/wildcards/
  3. Example hair.txt: one option per line — blonde, brunette, redhead, silver, black
  4. Use in prompts: woman with __hair__ hair in a __location__
  5. Set batch count to 20 — each image gets random combinations

Power move: Dynamic Prompts extension

Dynamic Prompts is more powerful — supports combinations, ranges, weights, and magic prompts (AI-assisted prompt variation). Install it for serious batch work.

Method 3: X/Y/Z Plot (Systematic Comparison)

Built into Forge — perfect for finding optimal settings or comparing models:

  • Script dropdown → X/Y/Z Plot
  • X axis: e.g., Sampler (DPM++ 2M Karras, Euler a, DPM++ SDE)
  • Y axis: e.g., CFG Scale (5, 7, 9, 11)
  • Z axis: e.g., Checkpoint (model A, model B, model C)
  • Result: A grid image comparing every combination — instantly see what works best

This is how experienced users find optimal settings without guessing. Run one X/Y/Z plot instead of 50 individual tests.

Method 4: ComfyUI API Automation

For full automation, ComfyUI exposes an API you can script against:

  • Export your workflow as JSON from ComfyUI
  • Use Python/curl to POST the workflow to http://127.0.0.1:8188/prompt
  • Modify prompt, seed, or model in the JSON before each request
  • Loop it — generate 1,000 images overnight with custom logic per image

This is how people build automated pipelines: generate → upscale → watermark → save — all hands-off, all local.

On cloud platforms, batch generation costs real money. 100 images on Midjourney = ~$10 of subscription time. 1,000 images = weeks of waiting on free tiers. Locally with LocalForge AI, you generate unlimited images for $0 after the one-time $50 purchase. Run 10,000 images overnight — no rate limits, no content filters, no per-image cost.

Tips for Efficient Batch Generation

  • Lower steps for exploration: Use 15 steps instead of 25 when batch-generating for selection — quality is slightly lower but 40% faster
  • Auto-name by seed: Forge saves seed in filenames by default. When you find a good image, note the seed for full-quality regeneration.
  • Use a fast SSD: Batch generation writes hundreds of images — an NVMe SSD prevents I/O bottlenecks
  • Monitor GPU temps: Sustained batch runs push your GPU to 100% for hours. Ensure good airflow. Most GPUs thermal throttle around 83°C.
  • Separate output folders: Use Forge's output directory settings to organize batch runs into separate folders

FAQ

Will running batch generation all night damage my GPU?

No. GPUs are designed for sustained loads (miners ran them at 100% for years). Ensure adequate cooling and you're fine. Keep temperatures below 85°C and you'll have no issues.

How much storage does batch generation use?

SDXL PNG at 1024×1024: ~2–4 MB per image. 1,000 images = ~3 GB. JPEG at quality 90: ~500 KB per image (1,000 images = ~500 MB). Plan storage accordingly for large batches.