String Chain
String Chain is the zero-setup prompt joiner
- STRING
String Chain does one thing, and it does it in four lines of Python: it takes two text boxes and joins them with a comma and a space. That sounds almost too dumb to install a node for, until you've rebuilt a prompt by hand because you wanted a fixed base plus a variable tail - this node is the "reconnect your prompts" part of its pack's tagline, and it makes the connection part of your graph instead of your typing.
How it works
The shape of the node is the clever bit. Both inputs are optional, but previous is marked forceInput, which means it's a socket you wire into, not a box you type into. The string input is a normal multiline text field you type (or paste) into. Wire its STRING output into CLIPTextEncode's text slot - or into another String Chain's previous - and you're done. The join rule is exactly what you'd want: if both sides have text you get "previous, string"; if only one side is filled you get that side alone, no stray comma. Nothing invented here, no separator to configure, no edge cases to think about.
The real reason to reach for it is chaining. Because previous is a wire input and the output is a plain STRING, you can daisy-chain three, four, ten of these: each node's output feeds the next node's previous, and every link inserts its own ", ". That's how you keep a prompt composable - your base subject lives in one node, your style in another, your quality tags in a third, and you can swap any one of them without editing a giant blob. If you're coming from the tag-prompting world (SDXL-lineage checkpoints that still read comma-separated booru tags best), this is a tidy way to assemble those fragments.
Install
Install is the least painful kind there is. Through ComfyUI Manager, search for ComfyUI-String-Chain (it's registered with the Comfy Registry, publisher uihp), or:
cd ComfyUI/custom_nodes
git clone https://github.com/uihp/ComfyUI-String-Chain
Restart ComfyUI. There is no requirements.txt, no models to download, no CUDA anything - pure Python standard library plus a little frontend JavaScript. It's the rare custom node that cannot break your environment, which is worth something in the dependency-hell era of this ecosystem.
Gotchas
Two honest caveats. First, the separator is hard-coded to ", " - if you want a newline, a dash, or nothing between the two strings, this is the wrong node; the pack's String Concat lets you type any separator. Second, this is a small, young pack (a single commit, an almost-empty README) with no community footprint yet. There are no forum wars over it because nobody's talked about it. For a two-input string joiner that's fine - the code is short enough to read in one go, so you're not betting much on maintenance. The one to watch in this family is String Toggle, which turns the same idea into actual prompt-switching; String Chain is just the honest, boring, reliable entry point.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| previousopt | STRING | — | |
| stringopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |