Nodes/ComfyUI-Fans/Fans Text Concatenate
ComfyUI Node

Fans Text Concatenate

The boring string glue your workflow actually needs

By uarefans·Created 3 years ago·Updated 2 years ago· 17
Fans Text Concatenate
    • STRING
    linebreak_additionfalse
    prompt
    text_a
    text_b
    text_c
    text_d
    text_e
    text_f
    text_g
    text_h
    text_i
    text_j

    This is the unglamorous workhorse of the ComfyUI-Fans pack. Fans Text Concatenate takes up to ten strings, joins them in order, and hands you one clean STRING back. That's it. No API, no model, no settings that matter - just a + b + c, which turns out to be one of the most used operations in a node graph full of prompt fragments.

    It's the natural companion to the pack's Fans Styler, which spits out ten separate style chunks you almost never want to feed a model individually. Run STYLE 1 through STYLE 10 into this node, add your subject text, and out the other end comes a single assembled prompt you can drop into CLIP Text Encode. You could do the same joining with a handful of text nodes and an iffy string-concat node, but one node with ten sockets is far easier to read and rewire.

    How it works

    The node concatenates its inputs in a fixed order: prompt, then text_a through text_j. Empty inputs are skipped, so you can leave most sockets unhooked and it quietly builds the string from whatever's actually connected. The only required input is linebreak_addition - set it to "true" and each chunk gets a newline between it and the next; "false" (the default) joins everything with no separator at all.

    The one real gotcha: all the text inputs are sockets, not text boxes. They're declared with forceInput, so you can't just type a phrase into them - you wire in a source node. In practice that means pairing this with the Fans Styler outputs, a text node, or the pack's prompt stylers. If you want to type something inline, add a separate text node upstream and wire it in.

    Install

    It ships with ComfyUI-Fans, so installing the pack gets you all four nodes. ComfyUI Manager: search "ComfyUI-Fans" and install, then restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/uarefans/ComfyUI-Fans
    

    Restart ComfyUI and you're done - there's no requirements.txt, no models to download, nothing heavier than Python's stdlib. If you're reading this only because a shared workflow complained about a missing node, Manager will sort it.

    Troubleshooting

    • Output looks glued together: that's linebreak_addition set to "false". Flip it to "true" if you want legible multi-line prompts.
    • Can't type into the inputs: expected - they're connector sockets by design. Wire a text source in.
    • Empty output: all inputs were empty or unhooked. Skip logic means nothing in, nothing out.
    Categoryutils

    Inputs (12)

    NameTypeDefaultDescription
    linebreak_additionCOMBOfalse2 options: false, true
    promptoptSTRING
    text_aoptSTRING
    text_boptSTRING
    text_coptSTRING
    text_doptSTRING
    text_eoptSTRING
    text_foptSTRING
    text_goptSTRING
    text_hoptSTRING
    text_ioptSTRING
    text_joptSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING