Render Tutorials
Batched image generation with Render Workflows

Run a real batch and browse the gallery

⏱ 8 min

This is the payoff step. You’ll send a real batch (5 prompts across 2 models, so 10 subtasks) to the deployed workflow and watch the whole fan-out tree run in parallel. Total wall-clock should sit close to the slowest single image, not the sum of ten.

The batch input

Real-world batches live in a file, not on the command line. Drop a batch.json at the repo root. The file uses the same positional argument array as the single-run CLI input.

batch.json
batch.json
[
[
"Why fan-out beats sequential generation",
"Three retries with exponential backoff",
"Idempotent batch outputs at scale",
"Object storage as the source of truth",
"Observing 10k subtasks in the Render Dashboard"
],
[
"gemini-3-pro-image-preview",
"gpt-image-1"
],
"photorealistic",
"bottom-bar",
"inter",
"",
""
]

Trigger the batch

Start the deployed generateBatch task with --input-file. Manual task starts require the Render CLI 2.12.0+.

Terminal
$render workflows start <your-workflow-slug>/generateBatch --input-file batch.json
Run started: <run-id> Dashboard: https://dashboard.render.com/workflows/<id>/runs/<run-id>
Terminal
$render workflows start <your-workflow-slug>/generateBatch --input-file batch.json
Run started: <run-id> Dashboard: https://dashboard.render.com/workflows/<id>/runs/<run-id>

The task identifier uses {workflow-slug}/{task-name}. Find the workflow slug on the task page in the Render Dashboard.

Watch the tree in the Render Dashboard

Open the Render Dashboard URL from the run output. The tree should look like this:

The leaf subtasks will finish out of order. That is expected: Gemini might finish before GPT-Image-1 for one prompt while another prompt is still uploading. The total wall-clock should track the slowest single leaf plus scheduling overhead, not the sum of all ten leaves. That is the proof that the batch beats a serial loop.

Hit the MinIO endpoint (or the equivalent for whichever object store you wired up) and browse thumbnails/. Ten new JPEGs should be sitting there, one per (prompt, model) pair.

You bump batch.json from 5 prompts x 2 models (10 subtasks) to 50 prompts x 3 models (150 subtasks). Each leaf subtask still takes between 4s and 25s depending on the model. Roughly what happens to total wall-clock?

What you learned

  • A batch.json keeps real-world inputs out of shell arguments
  • The Render Dashboard shows the full N x M run tree with per-subtask timing
  • Wall-clock scales sub-linearly with batch size because every leaf runs in parallel
  • The reference repo's Gallery is a quick way to visually browse the bucket without writing a frontend