Z-Image Ecommerce Batch Generation: 500 SKU Full-Scene Workflow
From single products to thousands of SKUs — a ComfyUI batch pipeline reduces ecommerce image production from "days" to "hours".
The Ecommerce Image Pain Point
A mid-sized ecommerce store with 500 SKUs needs per SKU:
- 1 white-background hero image (platform requirement)
- 2 lifestyle scene images (contextual display)
- 1 detail close-up (material/craftsmanship)
- 1 size comparison image (scale reference)
Total: 2,500 product images. Traditional approach (studio + post-production) costs $7,000-$21,000 over 2-4 weeks. With Z-Image batch pipeline, the same output in 1-2 days at under 5% of traditional cost.
Batch Pipeline Architecture
Overall Structure
Product List (CSV/JSON)
↓
Prompt Template Engine (auto-generate per-SKU prompts)
↓
ComfyUI Batch Generation Pipeline
↓
Auto-classify + Rename
↓
Output Directory (organized by SKU/scene)
Core Components
1. Product List Format (products.csv)
sku,product_name,category,color,background_style,prompt_extra
SKU-001,Leather Handbag,Fashion,Brown,minimal_studio,leather texture close-up
SKU-002,Ceramic Coffee Mug,Home,White,kitchen_scene,steam effect morning light
SKU-003,Running Shoes,Sports,Black/White,sport_outdoor,dynamic angle low shot
2. Prompt Template Engine
Auto-generate prompts per SKU from predefined templates:
templates = {
"white_bg": "{product_name}, {color}, professional product photography, white background, studio lighting, high resolution, clean composition",
"lifestyle_1": "{product_name}, {color}, {background_style}, lifestyle photography, natural lighting, atmospheric, editorial style",
"detail_shot": "{product_name}, {color}, macro photography, {prompt_extra}, sharp focus, texture detail, 8k",
"size_compare": "{product_name}, {color}, scale reference, hand holding, realistic proportion, lifestyle context"
}
3. ComfyUI Batch Pipeline
Use BatchPromptLoader + Z-Image Turbo nodes for fully automated batch generation.
ComfyUI Batch Pipeline Setup
Node Connections
CSVLoader (read product list)
↓
TextSplitter (split by rows)
↓
[ForEach] PromptTemplate (fill templates)
↓
CLIPTextEncode
↓
KSampler (Z-Image Turbo, batch_size=4)
↓
VAEDecode
↓
[ForEach] ImageSave (name per SKU)
Key Plugin
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack.git
# Provides batch loops and conditional branching
Batch Parameters
| Parameter | Recommended | Notes |
|---|---|---|
| batch_size | 4-8 | Adjust by VRAM; RTX 4090: 8 |
| resolution | 1024x1024 | Ecommerce standard |
| steps | 20-28 | 20 steps in Turbo mode |
| seed | -1 (random) | Random seeds for variety |
| output_format | PNG/JPEG | JPEG saves storage |
Practical Run: 500 SKU Full-Scene Generation
Scene 1: White Background Hero Images
Template Prompt:
{product_name}, {color}, professional product photography,
pure white background, studio lighting, centered composition,
high resolution, e-commerce listing image
Batch Run:
- 500 SKUs × 1 image = 500 images
- RTX 4090: ~15 minutes (batch_size=8)
- Output:
output/white_bg/SKU-001.png~SKU-500.png
Scene 2: Lifestyle Images (2 Styles)
Template A (Warm Home):
{product_name}, {color}, warm home interior,
soft natural lighting from window, cozy atmosphere,
lifestyle photography, editorial style, shallow depth of field
Template B (Minimalist Office):
{product_name}, {color}, modern minimalist office,
clean lines, natural light, professional setting,
high-end lifestyle, architectural background
Batch Run: 500 SKUs × 2 styles = 1000 images (~30 min on RTX 4090)
Scene 3: Detail Close-ups
{product_name}, {color}, macro close-up,
{prompt_extra}, sharp focus, texture detail visible,
studio lighting, 8k resolution, product detail shot
Scene 4: Size Comparison
{product_name}, {color}, realistic scale reference,
person's hand holding the product, natural lighting,
lifestyle context, showing size and proportion
Time and Cost Summary
| Metric | Traditional Studio | Z-Image Batch Pipeline |
|---|---|---|
| 500 SKUs × 4 images | 2500 images | 2500 images |
| Duration | 2-4 weeks | 1-2 days |
| Cost | $7K-$21K | ~$300 (electricity + cloud GPU) |
| Flexibility | Low (reshoot needed) | High (change prompt, rerun) |
Quality Control and Auto-Screening
Auto-Scoring
After batch generation, use CLIP scoring to auto-filter:
from clip_score import calculate_clip_score
for image in batch_output:
score = calculate_clip_score(image, prompt)
if score < 0.75:
move_to_retry(image)
else:
move_to_approved(image)
Manual Review Checklist
- [ ] Product color accuracy
- [ ] Text/Logo legibility (if applicable)
- [ ] Scene合理性 (no畸形 objects)
- [ ] Natural lighting
- [ ] Resolution meets requirements
Advanced Tips
1. Seed Control — Consistent Style Across Same SKU
Use same seed for all 4 images of one SKU to ensure lighting/style consistency:
sku_seed_map = {
"SKU-001": 42,
"SKU-002": 137,
# ...
}
2. Two-Stage Generation — Base Images First, Then Variants
Generate 500 "base images", confirm quality, then use img2img for style variants:
Base images (txt2img, batch=500)
↓
[Quality Check]
↓
Style variants (img2img, denoise=0.4, batch=2500)
3. Cloud GPU Deployment
For ultra-large batches (1000+ SKUs):
- AutoDL (China): RTX 4090 ~¥2/hour
- Vast.ai (Global): RTX 4090 ~$0.2/hour
- RunPod: Spot instances for lower cost
Troubleshooting
Q1: OOM (Out of Memory) during batch
Fix:
- Lower batch_size (8 → 4)
- Start ComfyUI with
--lowvram - Switch to FP8 quantized model
Q2: Inconsistent product colors
Fix:
- Add explicit color in prompt (
hex #FF5733) - Use ControlNet Canny to lock product outline
- Lower denoise (0.5-0.7)
Q3: Some SKUs generate poorly
Fix:
- Check that SKU's prompt accuracy
- Retry with different seed
- Build separate templates for special categories (e.g., transparent glass items)
Summary
Z-Image batch generation brings ecommerce product photography into the "industrial" era:
- Speed: 500 SKUs × 4 scenes = 2000 images in ~2 hours on RTX 4090
- Cost: Under 5% of traditional studio cost
- Flexibility: Change templates, switch styles, rerun anytime
- Scalability: 500 → 5000 SKUs just means adjusting batch parameters
For SME ecommerce sellers, this pipeline isn't a "future trend" — it's a "productivity tool you can use today."
This workflow uses ComfyUI + Z-Image Turbo + Impact Pack — all open source and free.