ComfyUI Node

text_mul_Join

Eight prompt fragments, one clean string — and it's picky about punctuation

By cardenluo·Created 2 years ago·Updated about 24 hours ago· 324
text_mul_Join
    • joined_text
    join_ruleComma
    custom_pattern{text1},{text2},{text3},{text4},{text5},{text6},{text7},{text8}
    text1
    text2
    text3
    text4
    text5
    text6
    text7
    text8

    You've got a subject, a style, a lighting phrase, a quality tag - and you're hand-wiring them into one giant prompt with + nodes and prayer. text_mul_Join gives you eight text inputs and a set of join rules, and it does the combining for you. It's the "assemble a prompt from parts" node, and it's the sort of thing that quietly earns its place once your prompt starts coming from multiple sources (a wildcard node, a saved snippet, a fixed style block).

    It's from ComfyUI-Apt_Preset, the big cardenluo pack built around a Loader → Controller → Sampler philosophy. Small nodes like this are the "prompt" utility drawer of the pack. English docs are thin (the pack's own descriptions are Chinese-first), but the node face is self-explanatory.

    How it works

    Each of text1 through text8 is normalized first - NFKC folded, non-printable characters dropped, whitespace trimmed. Empty inputs are skipped entirely, so you can leave slots unused and it won't emit stray separators. Then join_rule decides the glue:

    • None - raw concatenation, no separator.
    • Line / Space / Tab / Pipe - \n, space, \t, or |.
    • Comma / Period / Semicolon - and here's the quirk: these use full-width Chinese punctuation (,。;), not the half-width ASCII you might expect. That's deliberate - the author's audience writes in Chinese - but if you feed the output into an English-tag model, swap to Space or Line, or use Custom.
    • Custom - custom_pattern takes over, with {text1}{text8} placeholders you can rearrange, repeat, or drop. This is the mode for "style then subject then quality, no commas".

    If everything comes out empty, you get ❌ No valid content to join as a string - harmless in a prompt, but a nice signal when you're debugging.

    Inputs and outputs

    • join_rule - the enum above; Comma is the default, which given the full-width thing is worth knowing before it surprises you.
    • custom_pattern - only read in Custom mode; default is {text1},{text2},… so you'll want to edit it.
    • text1–text8 - plain string inputs.
    • Output: joined_text, a single STRING that goes straight into a CLIP Text Encode or downstream text nodes.

    Installing it

    Same pack, same install. ComfyUI Manager → search ComfyUI-Apt_Preset, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
    

    Restart ComfyUI, and on Windows run install.bat so the pack's heavier requirements (onnxruntime, scenedetect, pandas, and friends) are actually present - most of those aren't needed by this node, but the pack imports them at load time.

    Common issues

    The two things that trip people: forgetting that Comma means full-width , and expecting custom_pattern to do something in non-Custom modes (it doesn't). Both are one dropdown away. And because it's part of a big pack, keep the pack updated if ComfyUI's frontend updates break rendering - the "switch back to the legacy canvas" fix for Nodes 2.0 applies to any old pack like this one.

    CategoryApt_Preset/prompt

    Inputs (10)

    NameTypeDefaultDescription
    join_ruleCOMBOComma9 options: None, Custom, Line, Space, Comma, Period, +3
    custom_patternSTRING{text1},{text2},{text3},{text4},{text5},{text6},{text7},{text8}
    text1STRING
    text2STRING
    text3STRING
    text4STRING
    text5STRING
    text6STRING
    text7STRING
    text8STRING

    Outputs (1)

    NameTypeDescription
    joined_textSTRING