DivisorDePrompts (10)
One multiline text box, up to ten separate prompt outputs
- prompt_01
- prompt_02
- prompt_03
- prompt_04
- prompt_05
- prompt_06
- prompt_07
- prompt_08
- prompt_09
- prompt_10
- count
DivisorDePrompts is the lazy person's batch prompt feeder. Paste a whole block of prompts into one multiline text box, separated by blank lines, and the node splits them out into up to ten individual STRING outputs - one per prompt - plus a count so you know how many you actually fed it. No scripting, no arrays, no list gymnastics. It exists because "I have ten prompts and I want to run them through the same sampler, one at a time" is a recurring ComfyUI chore that shouldn't require a custom script node.
What it's for
Prompt iteration and batch testing. You draft a handful of variations on the same subject - different styles, different framings, different negative prompts - paste them in as one block, and pipe each output into your positive-prompt slot. Wire the outputs to a switch or sequence node and you can step through variations without editing the text box between runs. It's also handy for keeping a library of saved prompts in one paste-able place instead of ten separate text widgets.
How it works
The split is by paragraphs: one or more blank lines separate one prompt from the next, and each block becomes one output. The node normalizes Windows/macOS line endings, trims whitespace on each block if trim_mode is on (default), and - the bit that matters for real prompts - keeps internal newlines intact when preserve_newlines is on, so a multi-line prompt stays multi-line instead of being crushed into one long string. Everything past the tenth prompt is silently dropped, and outputs you didn't fill come out as empty strings with the count telling you how many real ones you got.
Inputs and outputs that matter
- full_text (STRING, multiline) - required. Your prompts, separated by blank lines. The placeholder says it plainly: paste prompts here, separated by empty lines.
- trim_mode (BOOLEAN, default
true) - trims leading/trailing whitespace per prompt. Leave it on. - preserve_newlines (BOOLEAN, default
true) - keep internal line breaks. Turn it off only if you want every prompt collapsed to a single line. - prompt_01 … prompt_10 (STRING) - the split-out prompts, in order.
- count (INT) - how many non-empty prompts were found. The one output you'll actually wire for logic.
Installing it
Ships in COMFYUI_PROMPTMODELS (PromptModels Studio in Manager), under Prompt Tools:
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
Restart ComfyUI. No API key - it's a pure text splitter, offline and instant.
Common issues
The blank-line separator is the whole contract, so formatting mistakes surface as merged or missing prompts: two prompts with no blank line between them become one, and a stray blank line inside a prompt splits it in two. The 10-prompt cap is silent - feed it twelve and prompts 11 and 12 just vanish (the count output will read 10, which is your clue). And if you've pasted text with weird spacing, trim_mode being on is usually the fix, not the problem.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| full_text | STRING | Pega tus prompts aquí, separados por líneas vacías... | |
| trim_modeopt | BOOLEAN | true | — |
| preserve_newlinesopt | BOOLEAN | true | — |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| prompt_01 | STRING | — |
| prompt_02 | STRING | — |
| prompt_03 | STRING | — |
| prompt_04 | STRING | — |
| prompt_05 | STRING | — |
| prompt_06 | STRING | — |
| prompt_07 | STRING | — |
| prompt_08 | STRING | — |
| prompt_09 | STRING | — |
| prompt_10 | STRING | — |
| count | INT | — |