Multi String Join
Join prompt blocks without the separator fiddling
- string
ComfyUI is full of text fragments - a subject block here, a style block there, a quality tag you always want at the end - and sooner or later you're manually pasting them together with commas and hoping it survives a queue. Multi String Join does the joining for you: up to however many string_N inputs you wire in, combined with a separator you control, plus a little text-filtering on the side. It's the "assemble the prompt from parts" node.
How it works
Every connected string_X input is cleaned, then joined with separator in wire order. The separator accepts escape sequences - \n, \t, \r are converted to real characters, so a newline join is one click instead of a paste adventure.
Two filters, both off by default:
- filter_comment - strips lines starting with
#and anything inside"""/'''blocks. Turn it on when your text blocks contain comments you want kept out of the final string. - filter_empty_line - drops blank lines.
There's also input, a single value substituted into any {input} placeholder inside the joined text - a way to inject a variable (a filename, a seed, a dynamically-generated word) into a template without another join step. It's applied to each block before joining, so the same template can be reused with different injected values.
The inputs that matter
- separator (
STRING, default\n) - the glue between blocks. - input (
STRING) - substituted for{input}in the blocks. - filter_empty_line / filter_comment (
BOOLEAN, both off by default) - the cleaners. - string_1 … string_N - the text blocks, added as you drag wires.
One output: string (STRING), the joined result.
Installing it
ComfyUI Manager → search ComfyUI-1hewNodes → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
Restart ComfyUI. Pure string processing - no models, no special deps beyond the pack's standard (heavy) requirements. The pack targets ComfyUI's newer comfy_api.latest API, so keep ComfyUI updated.
Common issues
The separator trap is thinking you typed a newline when you didn't: a literal \n in the field is converted, but if you paste an actual line break into the separator box, behavior can differ from what you expect - the escape-sequence handling is for the two-character form. Also, {input} substitution only fires if the placeholder actually appears in a block; an empty input with no placeholder changes nothing, which is the intended no-op. And remember the filters strip only when enabled - the default join does not clean your text, it just glues it, so if comments are leaking into prompts, flip filter_comment.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| filter_empty_line | BOOLEAN | false | — |
| filter_comment | BOOLEAN | false | — |
| separator | STRING | \n | — |
| input | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |