Concatenate
Joins up to five strings — and adds nothing in between
- STRING
Prompt building is string surgery, and this node is a scalpel - with one sharp edge. It takes up to five text inputs and glues them together end to end. No spaces, no commas, no newlines. Nothing in between. That's the entire behavior, and it's also the entire trap.
How it works
The implementation is as bare as it gets: first + second + third + fourth + fifth. Python string concatenation, five operands, done.
The inputs:
- first and second are required and wired (
defaultInput) - the two strings you actually care about - third, fourth, fifth default to empty strings, so leaving them blank costs you nothing
Output is a single STRING - not a list. If you wire "sunset" into first and "beach" into second, you get "sunsetbeach". If you wanted a space, you have to put it in yourself: type "sunset " or " beach". Same for commas, + style weights, or line breaks.
Why you'd reach for it
Its real job is assembling prompts from parts you control elsewhere in the graph. Say you've got a style string coming from one node and a subject from another - this merges them into one prompt without a text editor in between. The same glue works for building file names, labels, or any other string you're assembling from pieces.
The absence of a separator is honestly the feature: you're in charge of exactly what ends up between the parts, which is what you want when the middle bit matters - like inserting a comma-then-weight or a specific tag sequence.
Installing it
Ships in RF Nodes (foxtrot-roger/comfyui-rf-nodes). Easiest is ComfyUI Manager - search "RF Nodes", install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/foxtrot-roger/comfyui-rf-nodes
No dependencies, no models. Pure Python, one + chain. It's unmaintained since early 2024 but there's nothing here to break.
Gotchas
- No separator, ever. "light" + "room" is "lightroom". If your output looks mashed together, that's working as designed - put your spaces and commas in the inputs.
- Empty inputs join in as nothing, so the three optional slots are safe to ignore.
- The output is a single STRING, so you can't feed it into anything expecting a list. If you want the opposite (list → one text block), the pack's merge-lines node is the sibling for that.
It's five input ports and one addition. If you've ever hand-typed a prompt that combined three sources, you'll know in five seconds whether you need it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| first | STRING | — | |
| second | STRING | — | |
| third | STRING | — | |
| fourth | STRING | — | |
| fifth | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |