Render Tutorials
← All tutorials
intermediate ⏱ 46 min 7 steps

Batched image generation with Render Workflows

Take the blog-thumbnails reference workflow and extend it into a batched pipeline that runs N prompts × M models in parallel, ships results to object storage, and runs on Render.

Prerequisites

  • Render account with Workflows enabled
  • Render CLI 2.12.0+
  • Python 3.11+ or Node 20+
  • An OpenAI or Google AI API key (or both)
  • Docker for local MinIO, or an S3-compatible object storage bucket
  • Basic familiarity with Render Workflows, or completed the quickstart

Steps

  1. 01 What you'll build A batched image-generation pipeline on Render Workflows that fans a list of prompts out across multiple image models in parallel and saves every result to object storage. 5 min
  2. 02 Tour the repo and isolate the workflow Clone the reference repo, install only the workflow service for your chosen language, and set the API keys you'll need for the rest of the tutorial. 6 min
  3. 03 Run one generation locally Start the local workflow server, trigger the existing task with a single prompt and a single model, and watch the finished JPEG land in MinIO. 6 min
  4. 04 Read the multi-model fan-out Walk through the parent task that fans one prompt across M models, see how subtasks are spawned and awaited, and understand the retry policy. 6 min
  5. 05 Add the per-prompt fan-out for batches Add a new parent task that takes a list of prompts, fans out one M-model run per prompt, and produces N x M images in a single SDK call. 8 min
  6. 06 Deploy the workflow to Render Push the workflow service to Render, set the image API and storage env vars, and trigger the same single-prompt task remotely from your laptop. 7 min
  7. 07 Run a real batch and browse the gallery Submit a batch.json from your laptop, watch the N x M run tree fill out in the Render Dashboard, and browse the finished images in MinIO. 8 min