Merge Strings
Glue a bunch of prompt fragments into one string, without a coding node
- string
The most common string operation in a ComfyUI graph is also the one stock ComfyUI makes you do with a whole coding node: take "masterpiece," "a red sports car," "golden hour," and glue them into one prompt with commas. Merge Strings is that operation as a node - up to 64 string inputs, one delimiter, one merged string out. It's the simplest node in this pack and one of the most used, because every modular prompt workflow eventually needs it.
You'll reach for it the moment your prompts stop being one text box and start being assembled from parts - a subject fragment, a style fragment, a quality-tag fragment, each coming from a different node or a wildcard processor. Merge Strings is the final junction before the CLIP encoder.
How it works
The inputcount widget (2 by default) controls how many of the string_N inputs actually participate - only the first inputcount are read, and inputs grow dynamically as you connect more, up to 64. The Delimiter widget (default ", ") is what joins them, and you can use \n for a newline. Two deliberate touches worth knowing:
- It strips trailing punctuation (
.,;:!?) from each fragment before joining. Annoying if you want to preserve a period, but it's the reason "golden hour." + "cinematic." doesn't turn into "golden hour..cinematic." - When merging (not listing), runs of newlines get collapsed to spaces, so a multi-line fragment folds into a single-line prompt cleanly.
Flip return_as_list to true and it stops merging - it returns the individual strings as a list instead, which is handy when something downstream wants the fragments separately (a String from List node in this pack can then index them). The output type is a STRING list either way; with return_as_list off it's just a one-element list with the merged text.
The inputs that matter
inputcount- set how many fragments you're feeding in. Connecting a new slot bumps it, but the widget is the source of truth.Delimiter- the one you'll actually edit, when", "isn't what you want (newline-joined tags, for instance).string_1/string_2- wire your fragments here; the rest appear as you connect.
Install
Part of ComfyUI_Eclipse (r-vage). ComfyUI Manager, search ComfyUI_Eclipse, or:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse
Restart ComfyUI. Zero dependencies beyond the pack's standard stack, no model downloads. If you loaded a shared workflow that fails with [Eclipse] nodes, recall the pack renamed from RvTools_v2 and v4.0 dropped the old node IDs - the Workflow Migration Tool handles most of those.
Common issues
"Merged string is missing a fragment" - your inputcount is lower than the number of connected inputs; bump it. "There's a stray period" - that's the trailing-punctuation strip doing its job on a fragment that had internal punctuation you wanted kept. And the beginner trap: the output is a list containing the string, not a bare string - if the next node insists on STRING, use the return_as_list toggle correctly or grab the value from a Show Text node in this pack to see exactly what got produced.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 21β64 | Number of string inputs to merge. Only the first 'inputcount' string_X inputs will be used. |
| Delimiter | STRING | , | Delimiter to use between strings when merging. Use \n for newline. |
| return_as_list | BOOLEAN | false | If true, return list of individual strings; if false, return single merged string. |
| string_1opt | STRING | String input #1. | |
| string_2opt | STRING | String input #2. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | β |