String Append
The glue node for building prompts from parts
- string
The FairLab String Append node concatenates two strings. front plus back, in that order, done. If that sounds too simple to write an article about, consider that half of prompt engineering is just assembling text from parts - and every serious workflow ends up with a "build the prompt" region where tags, styles, and prefixes get joined together.
You reach for this when the same base prompt needs a different prefix in different branches, or when you want a single, editable quality-tag string feeding into a bigger assembly. It's the string-version of the plumbing that comfyui-node-plumbing.md calls out: one authoritative value, fanned out and combined rather than hand-typed in six places.
How it works
The function is literally front + back. It's a straight Python concatenation with no separator inserted and no trimming. That's the thing to remember: it does not add a comma, a space, or a newline. If you want "1girl, masterpiece" you feed it "1girl," and " masterpiece" - the comma and space are your job.
That makes it ideal for assembling comma-separated tag lists where you already control the formatting upstream, and it makes it a trap if you expect it to behave like a "join" utility. It won't clean up your front string either - trailing whitespace stays trailing.
The inputs that matter
- front - the string that comes first.
- back - the string appended to the end.
Both are STRING sockets and both can be wired from other nodes, which is the whole point: wire a String node holding your base prompt into front, and a second String node holding your style tags into back, and you can toggle branches without digging into text boxes. The single string output goes to a CLIP Text Encode or another Append if you need to chain.
Where it shines
- Building a prompt from a base string plus branch-specific tags.
- Pre-pending a fixed quality prefix to a user-provided prompt.
- Gluing a filename prefix to a number from Range String (remember your own separator).
- Chain a couple of Appends in series when you have more than two parts - there's no n-way concat, so a small daisy chain is the pattern.
For tag-oriented work specifically, FairLab also ships Prepend Tags and Append Tags, which do the smarter thing of inserting into each tag of a comma-separated list. Use those when you're operating on a tag list; use this when you just want two strings welded together.
Installing and troubleshooting
Same story as the rest of the pack - one install gets all 58 nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
cd ComfyUI-FairLab
pip install -r requirements.txt
then restart, or use ComfyUI Manager and search "ComfyUI-FairLab". This node has zero dependencies of its own, so if the pack loaded, this loaded. The only realistic failure mode is type mismatch: it expects STRING in, STRING out, and won't accept an INT socket. If a wire won't connect, convert your number to a string first with the pack's Int node or a primitive.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| front | STRING | — | |
| back | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |