Prompt Sequence Join
Zip prompt lists together — it's a zip, not a cartesian product
- text
Prompt Sequence Join is the node that makes the rest of the pack worth installing. It takes two or more prompt sequences and merges them into one combined list - so you can run "four expressions × two outfits" as a single queued batch instead of hand-writing all eight prompts. That's the headline use case, and the README's minimal graph is basically this node: two Text nodes in, one text list out, straight into CLIP Text Encode.
But manage your expectations on the math. This is a zip, not a cartesian product. It pairs the first prompt of A with the first of B, the second with the second, and so on - it does not generate every combination. A 4-item list and a 2-item list give you 4 joined results (with the shorter list padded), not 8. If you genuinely want every cross product, this isn't that node.
How it works
Start with two text inputs; bump input_count and click update inputs to reveal more - up to 32 sockets, all fed by text_1 through text_32. Then decide how uneven lists behave:
separator- the glue between parts, default", ". It understands escapes:\nor/nbecome a newline, so,\ngives you a comma-newline join for multi-line prompts.length_policy-longest(default) emits until the longest input is exhausted;shorteststops at the shortest connected input.missing_policy- what happens when a shorter input runs dry:blank(default) leaves the spot empty,repeat_lastreuses that input's final value.skip_empty- when on (default), blank parts are dropped along with their separator, so you don't get", , "gaps.max_items- caps the final joined count.
The README's example shows the default policy clearly. A is a1, a2, a3, a4, B is b1, b2. Output: a1, b1 / a2, b2 / a3 / a4. Switch missing_policy to repeat_last and it becomes a3, b2 / a4, b2 - B's last value carries the tail. That's the setting you want when a constant background or style should repeat across a longer subject list.
Output
text - one STRING list, the joined batch, wired into CLIP Text Encode like any other sequence output.
Install
ComfyUI Manager, search comfyui-prompt-sequence, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Localsmile/comfyui-prompt-sequence
Restart after either. No extra dependencies or model files.
The failure modes
The classic stumble is changing input_count and expecting the sockets to appear - they don't until you hit update inputs. Forgetting that is the top "why is it still showing two inputs" report. The second one is expecting cartesian behavior; when your batch comes out shorter than the number of combinations you imagined, re-read the zip explanation above. And the separator escapes only translate \n//n/\t - type the literal characters into the field, not an actual newline, or you'll get it right in the UI and wrong in the export.
Inputs (38)
| Name | Type | Default | Description |
|---|---|---|---|
| input_count | INT | 21–32 | Number of visible text inputs. Click update inputs after changing it. |
| separator | STRING | , | Text inserted between parts. Use \n or /n for a newline, including ,\n or ,/n. |
| skip_empty | BOOLEAN | true | When enabled, blank missing parts are removed before joining, including their separator. |
| length_policy | COMBO | longest | longest: emit up to the longest input. shortest: stop at the shortest connected input. |
| missing_policy | COMBO | blank | blank: missing values become empty text. repeat_last: reuse the shorter input's final value. |
| max_items | INT | 00–10000 | 0 keeps all joined prompts. A positive value limits the final joined output count. |
| text_1opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_2opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_3opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_4opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_5opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_6opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_7opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_8opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_9opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_10opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_11opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_12opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_13opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_14opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_15opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_16opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_17opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_18opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_19opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_20opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_21opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_22opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_23opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_24opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_25opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_26opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_27opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_28opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_29opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_30opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_31opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. | |
| text_32opt | STRING | Connect a prompt sequence. Missing values follow missing_policy. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |