View all articles
ComfyUITutorialImage GenerationWorkflow

ComfyUI Batch Image Generation: Create 100 Product Images in Minutes

JG
Jacobo González Jaspe
|

Reviewed:

Abstract illustration: a prism fanning a white beam into amber and white rays. Creators
Illustration generated with AI on our own machine.

Need consistent product images, social media graphics, or marketing assets? ComfyUI’s batch generation workflow lets you create hundreds of variations from a single prompt template. All runs locally on your hardware with zero API costs.

ComfyUI image generation workflow
flowchart LR
    A["Load SDXL\nCheckpoint"] --> B["Set Prompt\nTemplate"]
    B --> C["Configure\nBatch Size\n& Resolution"]
    C --> D["KSampler\n(4 steps, CFG 1.0)"]
    D --> E["VAE Decode"]
    E --> F["Save Images\n(auto-named)"]

    B --> NEG["Negative\nPrompt"]
    NEG --> D

    C --> SEED["Fixed Seed\n(reproducible)"]
    SEED --> D

    F --> OUT["output/\nbatch_001.png\nbatch_002.png\n..."]

    style A fill:#DBEAFE,stroke:#2563EB,color:#000
    style B fill:#FEF3C7,stroke:#F5A623,color:#000
    style C fill:#FEF3C7,stroke:#F5A623,color:#000
    style D fill:#D1FAE5,stroke:#059669,color:#000
    style E fill:#D1FAE5,stroke:#059669,color:#000
    style F fill:#D1FAE5,stroke:#059669,color:#000
    style NEG fill:#FECACA,stroke:#B91C1C,color:#000
    style SEED fill:#DBEAFE,stroke:#2563EB,color:#000
    style OUT fill:#D1FAE5,stroke:#059669,color:#000
Diagram

What This Workflow Does

Our Batch Image Generation workflow for ComfyUI:

  1. Takes a text prompt template with variables (product name, style, background)
  2. Generates multiple variations using SDXL Turbo for speed
  3. Outputs consistent, branded images at configurable resolutions
  4. Saves to organized folders with automatic naming

Hardware requirement: 8GB+ VRAM (RTX 4060 or better) or 16GB+ unified memory (Mac Mini M4)

Download the Workflow

Download vorlux_batch_image_generation.json: import directly into ComfyUI.

Step-by-Step Setup

1. Install ComfyUI

If you don’t have ComfyUI yet:

bash
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
python main.py

Open http://localhost:8188 in your browser.

2. Import the Workflow

Drag the downloaded .json file onto the ComfyUI canvas. The workflow includes:

  • KSampler node configured for SDXL Turbo (4 steps, CFG 1.0)
  • Batch size parameter (default: 10 images per run)
  • Resolution presets: 512x512, 1024x1024, 1200x628 (social), 1920x1080 (HD)
  • Save Image node with automatic naming

3. Configure Your Prompt Template

The workflow uses a prompt template with placeholders:

text
Professional product photo of [PRODUCT], 
clean white background, studio lighting, 
[STYLE] aesthetic, high resolution, sharp focus

Replace [PRODUCT] and [STYLE] with your specifics. Examples:

  • “Professional product photo of a Mac Mini M4, clean white background, minimalist aesthetic”
  • “Social media banner for AI consulting company, dark navy background, modern tech aesthetic”

4. Set Batch Size and Resolution

In the Empty Latent Image node:

  • Width/Height: Choose your target resolution
  • Batch size: Set how many images to generate (1-50 per batch)

For SDXL Turbo at 512x512:

  • RTX 4060: ~2 seconds per image
  • Mac Mini M4: ~3 seconds per image
  • RTX 4090: ~0.8 seconds per image

5. Queue and Generate

Click “Queue Prompt”: your batch generates automatically. Images save to ComfyUI/output/ with sequential numbering.

Real-World Use Cases

Use CaseImages NeededTime (RTX 4060)Cloud API CostLocal Cost
Product catalog (50 items)50~2 minutes~EUR 5 (DALL-E)EUR 0
Social media month (30 posts)30~1 minute~EUR 3EUR 0
Website hero variations10~20 seconds~EUR 1EUR 0
A/B test thumbnails20~40 seconds~EUR 2EUR 0

Tips for Consistent Results

  1. Use a fixed seed for reproducible batches: change seed to get new variations
  2. SDXL Turbo is fastest for batch work (4 steps vs 20+ for standard SDXL)
  3. Negative prompts matter: add “blurry, low quality, distorted” to filter bad outputs
  4. ControlNet for consistency: use a reference image to keep style uniform across batches

Optimizing Batch Generation Speed

If you are generating 50+ images per session, these optimizations can cut your total time by 30-50%:

  1. Enable VAE tiling. In the VAE Decode node, check “tile” if available. This reduces VRAM spikes on large batches and prevents out-of-memory crashes, especially at 1024x1024.
  2. Use FP16 precision. When loading your checkpoint, select the fp16 variant if your GPU supports it (all RTX cards do). This halves memory usage and speeds up inference with negligible quality loss.
  3. Generate at lower resolution, then upscale. Generate at 512x512 with SDXL Turbo (fastest), then run a second batch through a 2x upscaler node. The total time is often less than generating directly at 1024x1024.
  4. Queue multiple small batches instead of one large batch. A batch size of 10 queued 5 times is more stable than a single batch of 50, which can cause VRAM fragmentation and slowdowns.
  5. Close other GPU-consuming applications. Discord, browser hardware acceleration, and video players all compete for VRAM. On an 8GB card, freeing even 500MB can prevent swapping to system RAM (which is 10x slower).
  6. Pin your model in memory. If using ComfyUI Manager, enable “keep models in VRAM” to avoid reloading the checkpoint between queues. This alone saves 3-5 seconds per batch on NVMe storage, more on HDD.

For production workloads generating 500+ images per day, consider a dedicated Mac Mini M4 (24GB) running ComfyUI as a headless image server: a one-time hardware cost instead of a per-image API bill. To see when it pays for itself at your volume, use our break-even guide.

Next steps

  • Download the workflow JSON file to your local machine
  • Import the file directly into your ComfyUI canvas
  • Follow the setup steps to install and configure ComfyUI
  • Test the batch generation speed using an RTX 4060

Sources: ComfyUI GitHub · Stable Diffusion Models

Need help implementing AI workflows in your business? Schedule a free consultation to design a pipeline tailored to your needs.

Work with us

We size the model and the machine by measuring, not by guessing. If you want to see your own task running on real hardware, book a 15-minute call or see how we work in consulting.

Diagram
Share: LinkedIn X
Veredicto semanal

Get new guides before anyone else

Subscribe and we tell you when new guides, templates and workflows go up. One email a week, no spam.

Already published: 69 guides and 25 templates. All free, no signup.

Bonus: the local-AI starter pack PDF when you subscribe
Once a week No spam Unsubscribe anytime

See what you get

The EU AI Act now applies: a checklist you can complete

Tell us what you want to run

Tell us what you want to run and on what budget. We will tell you which hardware you need, which model fits, and what to expect from it, before you spend anything.

First call free, 15 min Local-first: your data stays on your network Open tools and guides

69 free guides · 17 compliance templates