Nodes/RES4LYF/TextBoxConcatenate
ComfyUI Node Runs on cloud

TextBoxConcatenate

Build prompts out of parts instead of retyping the whole thing

By ClownsharkBatwing·Created 2 years ago·Updated 17 days ago· 1,222
TextBoxConcatenate
    • text
    text
    text_external
    separator
    mode

    If you've ever kept a "quality suffix" or a style anchor that you copy-paste into every prompt by hand, TextBoxConcatenate is the node that stops you doing that. It's a text box that can glue an external string onto itself, before or after, with whatever separator you want between them - the same job you might otherwise reach for a string-concatenate utility node to do, except this one also gives you a place to actually type and store the fixed half of the prompt, rather than needing a separate text node feeding into a separate concat node.

    How it works

    You keep a base block of text in the node's own multiline field. An optional external string can come in from anywhere else in your graph, and mode decides whether that external text gets appended after your base text or prepended before it. separator is whatever goes between the two - a comma, a newline, a space, or nothing at all.

    The inputs and outputs that matter

    • text (STRING, multiline, required) - your base text block.
    • text_external (STRING, optional) - the string to glue on, coming from elsewhere in the workflow.
    • separator (STRING, optional) - what goes between text and text_external. Defaults to empty, so the two will run together with no space unless you set one.
    • mode (enum: append_external_input / prepend_external_input) - whether the external text lands after or before your base text.
    • Output: text - the combined string.

    A practical use: keep a fixed style anchor here and feed a changing subject prompt in via text_external - useful for RES4LYF's regional and temporal conditioning zones, where you often want a shared style phrase concatenated onto several different per-zone prompts without retyping it into each one. It also composes cleanly with TextBox3 or TextTruncateTokens upstream - build a fragment somewhere else in the graph, feed it in as text_external, and this node becomes the join point rather than the source of every string in your workflow.

    How to install it

    Via ComfyUI Manager: search RES4LYF, install, restart.

    Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ClownsharkBatwing/RES4LYF
    cd RES4LYF
    pip install -r requirements.txt
    

    Portable installs: point at the embedded Python's pip.exe. No models or heavy dependencies here - it's a text utility, working the moment the pack is installed.

    Common issues & troubleshooting

    Text runs together with no space. separator defaults to empty. If your combined prompt reads like stylesubject instead of style, subject, you forgot to set a separator.

    External text landing on the wrong side. It's easy to leave mode on whatever the default happens to be and wonder why your external string isn't showing up where expected - check append_external_input vs prepend_external_input if the order looks backwards.

    Nothing changes when text_external is empty. That's expected - with no external input, this node just passes text through with the separator having nothing to attach to.

    CategoryRES4LYF/text

    Inputs (4)

    NameTypeDefaultDescription
    textSTRING
    text_externaloptSTRING
    separatoroptSTRING
    modeoptCOMBO2 options: append_external_input, prepend_external_input

    Outputs (1)

    NameTypeDescription
    textSTRING