The 'Prompt Multi Batch Generation' workflow in ComfyUI offers a powerful approach to comparing multiple prompts simultaneously. By utilizing the FL_PromptMulti node, users can send different prompts at the same time, each generating its own output independently. This setup is ideal for batch processing where variations in prompts need to be evaluated quickly and efficiently. The workflow is particularly useful when connected to Blueprint or Partner Nodes, enabling users to process different modalities in a batch, thus saving time and resources. One of the key differences in this workflow is the ability to handle multiple prompts in a single queue entry, which contrasts with traditional methods that require sequential processing. This parallel processing capability allows for faster iteration and comparison, although it requires careful management of resources, as each prompt slot equates to a separate run, potentially increasing costs when using Partner Nodes.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run "Prompt Multi Batch Generation" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("templates_purz_batch_generation_api.json");
const job = await client.run(wf);
await job.getOutputs("36")[0].toFile("output.png"); // SaveImageThe SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ














