String Batch
Batch a handful of prompts into one clean output
- string_batch
ComfyUI's core nodes will happily take one prompt. They won't take twenty, one per shot, and switch between them. String Batch is the node that fixes that gap: you type up to 24 prompts into string_1 through string_24, and it hands them out as a single string_batch - a tuple the rest of the pack's batch machinery (and ComfyUI's batch-aware samplers) can consume.
It's the foundation of the String Batch family in Mickmumpitz-Nodes. Almost everything else in that category builds on this output type: String Selector pulls one prompt out by number, Iter String Selector pulls one out per video iteration, PromptStitcher appends a style suffix to every prompt in the batch. This is the input side of all of it.
How it works
num_fields (1–24, default 4) controls how many string_N text boxes are visible. Fill them, and the node returns them in order as a STRING_BATCH tuple - positions 1 through num_fields, exactly. That's the entire mechanism: no hidden handlers, no JS, no state. It's a plain list-of-strings in, tuple-of-strings out.
The small detail that matters: num_fields is what gets batched. Strings beyond num_fields are ignored, and if you raise num_fields later, the new slots start empty. The batch is positional, so downstream index-based selection (String Selector's select, or iteration-based selection) maps straight onto the order you typed.
Inputs and output
num_fields(INT) - how many prompt slots to show and batch.string_1…string_24(STRING, multiline) - the actual prompts.- Output:
string_batch(STRING_BATCH).
Where it fits
The classic use is multi-prompt generation: a batch of one prompt per scene or variation, then a sampler that processes the whole batch (or a selector that picks one at a time). It's also the backbone of the pack's storyboard approach - pair it with Story & Style Selector for the story index and String Selector to feed that story's prompt to the sampler. For video iteration, Iter Prompt Builder is a more specialized sibling that batches prompts and extracts per-iteration start frames.
Installing
Part of Mickmumpitz-Nodes - ComfyUI Manager → search "Mickmumpitz" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes
Just numpy, Pillow, opencv-python - nothing to download. The pack is by Mickmumpitz, a YouTuber whose consistent-character and iterative-video workflows lean on this kind of prompt-batching plumbing.
Gotchas
Two habits to avoid. First, leave num_fields at the default 4 and you silently drop prompts 5–24 - set it to your real count. Second, remember STRING_BATCH is its own type: a bare string won't connect where a batch is expected, and a batch won't drop into a plain string input. If the wire won't connect, you're missing the selector node in between. That type mismatch is the one thing that confuses people on the first day, and it's exactly what the selectors exist to bridge.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| num_fields | INT | 41–24 | — |
| string_1opt | STRING | — | |
| string_2opt | STRING | — | |
| string_3opt | STRING | — | |
| string_4opt | STRING | — | |
| string_5opt | STRING | — | |
| string_6opt | STRING | — | |
| string_7opt | STRING | — | |
| string_8opt | STRING | — | |
| string_9opt | STRING | — | |
| string_10opt | STRING | — | |
| string_11opt | STRING | — | |
| string_12opt | STRING | — | |
| string_13opt | STRING | — | |
| string_14opt | STRING | — | |
| string_15opt | STRING | — | |
| string_16opt | STRING | — | |
| string_17opt | STRING | — | |
| string_18opt | STRING | — | |
| string_19opt | STRING | — | |
| string_20opt | STRING | — | |
| string_21opt | STRING | — | |
| string_22opt | STRING | — | |
| string_23opt | STRING | — | |
| string_24opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string_batch | STRING_BATCH | — |