IF Join Text📝
Concatenate up to four strings with a separator — the pack's glue node
- STRING
IF Join Text is the plainest node in the IF_AI pack: four string inputs, one output, one separator. It takes whatever strings you feed it, joins the non-empty ones together with the separator, and passes the result downstream. That's the entire job. If you've ever hand-built prompt strings out of pieces - a base prompt from a text node, a style tag, a wildcard expansion - you know this is the node you were missing in vanilla ComfyUI.
It lives in the pack because the IF LLM nodes are forever composing and decomposing strings, and someplace needs to put them back together. It's also the perfect place to assemble a full system prompt from a few fragments before handing it to IF Chat Prompt's prime_directives.
How it works
The mechanism is one line, essentially: collect text1 through text4, drop any that are empty or whitespace-only, then separator.join(...) the survivors. The separator defaults to a single space, so the zero-config behavior is "these strings, joined by spaces." Want a comma-separated list or a newline between blocks? Type it in the separator field - it accepts any string. The result also prints to the console with the pack's banner, which is handy for debugging assembled prompts before they hit the sampler.
The inputs that matter
separator- the text inserted between joined strings. Default" ".text1…text4- up to four strings. They're forced inputs, so wire them from other nodes. Empty ones are skipped, so you can leave a slot unwired.
Output: one STRING - the joined result.
Installation
Pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/if-ai/ComfyUI-IF_AI_tools.git
pip install -r requirements.txt
Or "IF_AI_tools" via ComfyUI Manager and restart. No model files, no extra dependencies.
Gotchas
It's hard to break, but note what it doesn't do: there's no trimming of whitespace around inputs, no smart handling of punctuation, so "fantasy art" and "," and " dragon" will happily produce "fantasy art,, dragon". And it silently drops empty inputs rather than preserving them - which is usually what you want, but worth remembering if you ever expected literal empty slots in the output. Beyond that, it's exactly as boring as a concatenation node should be, in an archived pack full of much flashier things.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | STRING | — | |
| text1opt | STRING | — | |
| text2opt | STRING | — | |
| text3opt | STRING | — | |
| text4opt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |