Nodes/IF_LLM/IF Join Text 📝
ComfyUI Node

IF Join Text 📝

Glue Up to Four Strings Together With One Separator

By if-ai·Created 2 years ago·Updated about a year ago· 157
IF Join Text 📝
    • STRING
    separator
    text1
    text2
    text3
    text4

    IF_LLM_JoinText does exactly one thing: takes up to four text inputs and joins the non-empty ones with a separator you pick. That's the whole node, and that's fine - concatenation is one of those operations you need constantly and don't want to hand-roll with a custom script node every time.

    You'll reach for it in a prompt pipeline. The IF_LLM pack is all about assembling prompts from parts - an LLM response here, a style token there, a fixed prefix over here - and something has to stitch those pieces together before they hit the text encoder. This is that something.

    How it works

    The only required input is separator, the string inserted between parts. It defaults to a single space, which is right for most prompt work, but there's nothing stopping you from using , , \n, or -- if that's what your workflow wants. The four optional inputs are text1 through text4, all wired in (forceInput), all optional. Empty inputs are skipped entirely, so a half-connected node doesn't spray stray separators everywhere - that's the detail that saves you from the classic "why is there a comma at the start of my prompt" debugging session.

    The single output is a STRING: the joined result.

    The typical shape: IF_LLM response into text1, a style or quality phrase into text2, and you're done. Or feed it four fixed fragments and use the separator as your prompt grammar.

    Installing it

    Ships with the pack, so one install covers it. ComfyUI Manager (search "IF_LLM") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/if-ai/ComfyUI-IF_LLM
    

    then restart. Standard pack notes: the README warns it conflicts with IF_AI_tools (uninstall that first), and the dependency install is heavy - transformers, torch, triton, decord - so expect a wait on first setup.

    Troubleshooting

    • Separator appearing at the start or end - can't happen here; empty inputs are skipped before joining, so you only get separators between actual values. If you're seeing stray separators, one of your inputs isn't as empty as you think - check for whitespace-only strings.
    • More than four strings - this node caps at four inputs. For bigger joins, chain two of them or reach for a dedicated text-utility pack (like ComfyUI_essentials) that handles arbitrary lists.
    • Multiline separator - the field is single-line only. If you need a newline between parts, this node isn't the tool; a text editor node handles that.

    It's the least glamorous node in the pack and it earns its keep exactly because it's boring and reliable. Sometimes that's all you want.

    CategoryImpactFrames💥🎞️/IF_LLM

    Inputs (5)

    NameTypeDefaultDescription
    separatorSTRING
    text1optSTRING
    text2optSTRING
    text3optSTRING
    text4optSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING