Batch Process Text Prompts From List
Loads and executes a workflow sequentially using prompts from a text list. Iterates through each entry to generate multiple outputs from a single batch operation.
试试一个示例
关于此工作流
This ComfyUI tutorial workflow automates running a list of text prompts one-by-one and saving an image for each entry. It uses the custom FL_PromptSelectorBasic node to read a multiline prompt list and select a single line based on an index provided by a PrimitiveInt node. That selected prompt is then fed into the generation chain powered by the Z-Image-Turbo model, and the resulting image is written to disk by SaveImage. A MarkdownNote in the graph documents the intent and wiring so you can quickly see how the pieces fit together.
Under the hood, FL_PromptSelectorBasic exposes a text field where you paste prompts (one per line). The PrimitiveInt node supplies an index that determines which line is currently active. In a batch run, the index advances one step per batch iteration (when driven by your generation/driver node; listed here as ca7506c4-0f1a-4a77-9d2e-b9077eaf58d5), so each iteration consumes the next prompt from the list. This pattern is ideal for prompt A/B testing, producing sets of assets, or iterating through a campaign brief without manually editing the graph between runs.
常见问答
The PrimitiveInt provides the selected line’s index. Use 0 for the first line, 1 for the second, and so on. In batch mode, the connected driver advances the index one step per iteration.
When the index exceeds the number of lines, the selector returns an empty prompt. This can yield generic or unintended images. Match your batch iterations to the number of lines, or trim trailing blank lines.
Yes. FL_PromptSelectorBasic only swaps the main text prompt. Keep your negative prompt, seed, and other generation parameters set in the Z-Image-Turbo chain and they will apply to every iteration.
SaveImage writes to the ComfyUI/output directory using its configured filename prefix. Set a clear prefix (e.g., zturbo_list_run_01) before batching so files are easy to track against your prompt list.