Cowboy Multi-Line String Concatenate
Ten strings, one clean multi-line prompt
- text
Every serious workflow ends up building a prompt from parts - a subject line, a style block, a quality tag, a lighting phrase - and if you've done that in ComfyUI, you've hit the annoyance: there's no native node that just joins strings cleanly. Cowboy Multi-Line String Concatenate is the fix: ten string slots, each becomes one line of the output, and the whole thing collapses into a single STRING. It's the plumbing-layer node that fights repetition and illegibility, which is exactly what that layer of the graph exists for.
The model is simple and worth internalizing: each filled slot is one line. Type into a slot, or connect a string into it - the node accepts both, so it works equally well for a hand-typed quality suffix and a value that came from a filename extractor or a prompt-builder node. Empty slots are skipped by default (skip_empty on), which is the behavior you want 95% of the time: leave slots unused and they silently vanish rather than leaving blank lines in your prompt. Flip skip_empty off and an empty slot adds a blank line - which is occasionally the point (visual spacing in a multi-line caption, say).
What you'd actually use it for
- Assembling a multi-line prompt from per-aspect components - subject / style / lighting / negative-ish reminders - where the line break is meaningful and you want each piece editable without touching a giant blob.
- Splicing node output into a template. A filename extractor gives you one line; a fixed style block is another; the concatenate merges them with newlines in between.
- Building a batch of prompts when combined with a line-driven loop - each slot fed by a different source, one text output downstream.
The single output is text, tooltipped as "All the filled slots joined with newlines." There's no separator option and no delimiter - newline is the contract. If you need commas, that's the same pack's string-list tooling or just end each slot's text with a comma.
Gotchas
The dynamic-input sibling (Cowboy Multi-Line String Concatenate (Dynamic)) grows slots as you connect them; this one is fixed at ten. If you find yourself wanting eleven lines, that's the Dynamic version's job, not this one's. Also note each slot is a single line input - if you paste a multi-line block into one slot, it becomes one multi-line string that still joins as a unit, which is usually fine but occasionally surprises people who expected per-line splitting.
It ships in TrentNodes: ComfyUI Manager (search "Trent Nodes"), or git clone https://github.com/TrentHunter82/TrentNodes into custom_nodes/ + pip install -r requirements.txt. No models, no downloads, no dependencies beyond the pack core. It's the kind of node that looks too simple to matter until you've rebuilt "join these strings" with a custom function node once - then it just lives in your graph.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| string_1opt | STRING | Slot 1. One line of the output. | |
| string_2opt | STRING | Slot 2. One line of the output. | |
| string_3opt | STRING | Slot 3. One line of the output. | |
| string_4opt | STRING | Slot 4. One line of the output. | |
| string_5opt | STRING | Slot 5. One line of the output. | |
| string_6opt | STRING | Slot 6. One line of the output. | |
| string_7opt | STRING | Slot 7. One line of the output. | |
| string_8opt | STRING | Slot 8. One line of the output. | |
| string_9opt | STRING | Slot 9. One line of the output. | |
| string_10opt | STRING | Slot 10. One line of the output. | |
| skip_emptyopt | BOOLEAN | true | On - an empty slot adds no line. Off - an empty slot adds a blank line. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | All the filled slots joined with newlines. |