Nodes/ComfyUI-YCNodes/YC text box combine
ComfyUI Node

YC text box combine

Five text boxes, one node — write your prompt in parts and get the join for free

By yichengup·Created 2 years ago·Updated 4 months ago· 48
YC text box combine
    • text1_out
    • text2_out
    • text3_out
    • text4_out
    • text5_out
    • combined_text
    text1text1
    text2text2
    text3text3
    text4text4
    text5text5
    separator

    YC text box combine is a prompt authoring convenience: five multiline text boxes (or wired string inputs) in one node, plus a separator, and it outputs the five parts and the combined string. So you can build a prompt out of components - subject / style / lighting / camera / negative-ish bits - keep them as separate editable boxes, and still hand a single assembled string to your CLIP encoder.

    The real appeal is the five passthrough outputs (text1_outtext5_out). Because each input is echoed out individually, the node doubles as a clean junction point: you can tap one component for a different branch (a filename label, a caption, a separate encode) without having to split the combined string back apart. It's the "keep my prompt modular" node.

    How it works

    Five strings plus a separator (default a single space) get joined in order. Nothing else - no case handling, no trimming, no weighting logic. If a box is empty, you get the separator anyway unless you're careful (empty text2 between filled neighbors yields a double space; feed empty-string-aware behavior yourself or just don't leave gaps).

    The inputs that matter

    text1 through text5, all multiline, and separator. That's the whole surface. Outputs: text1_outtext5_out (each echoing its input) plus combined_text (the joined result). For SD/SDXL-style prompts, a space separator is right; for booru-tag style, you might want , .

    Install

    Part of ComfyUI-YCNodes. ComfyUI Manager → search "ComfyUI-YCNodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yichengup/ComfyUI-YCNodes
    

    Restart ComfyUI. Standard deps, no downloads. Under "YCNode/Text".

    Gotchas

    The separator is always inserted between boxes, even empty ones - five boxes with only text1 filled produces "your text" plus four trailing spaces unless you account for it. Not a bug, just literal. And while the passthroughs are handy, remember they're echoes of inputs; if a box isn't wired it returns its default placeholder text ("text1" and friends), which you do not want in a real prompt - either wire them or clear the defaults. For combining prompts with LoRA trigger words or dynamic content, a wildcard-capable combiner is more powerful; this one is the simple, readable option.

    CategoryYCNode/Text

    Inputs (6)

    NameTypeDefaultDescription
    text1STRINGtext1
    text2STRINGtext2
    text3STRINGtext3
    text4STRINGtext4
    text5STRINGtext5
    separatorSTRING

    Outputs (6)

    NameTypeDescription
    text1_outSTRING
    text2_outSTRING
    text3_outSTRING
    text4_outSTRING
    text5_outSTRING
    combined_textSTRING