Nodes/comfyUI-tool-2lab/concat text 合并文本
ComfyUI Node

concat text 合并文本

The boring string-joiner that actually keeps your prompts sane

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
concat text 合并文本
    • text
    text1
    text2
    separator,

    Most of your ComfyUI time is spent bolting strings together, not dreaming up the prompt. This node is the 2lab pack's take on the concat idea: it takes two strings, drops a separator between them, and hands you the joined result as one STRING. That's the whole job. No templating, no wildcard magic, no "smart" merging that reorders your words. If you've used the concat node from WAS or Impact, you already know exactly how this behaves - this one is just smaller and comes bundled with the pack.

    Why reach for it? Because building a prompt from parts is genuinely useful once your workflow grows. Keep a base style string, a subject string, and an "extra detail" string as separate nodes, then join them right before the CLIP Text Encode. When you want to tweak one slice of the prompt without hunting through a wall of text, you change one node instead of rewriting everything. It's the same trick as the {prompt} merge in A1111, minus the syntax to learn.

    The inputs that matter:

    • text1 / text2 - the two strings to join, in that order.
    • separator - what goes between them, default ",". Set it to a space if you don't want commas in the prompt, or "," is honestly the right call for prompt work. A common stumble: leave the default and get "subject,style" when you wanted "subject style".

    The single output, text, is a STRING that plugs straight into a CLIP Text Encode (prompt) or into another text node further down the line. It's marked as an output node, so you can also just run the graph and eyeball the result in the UI.

    One thing worth knowing before you build a whole graph around it: this pack ships two concat nodes. concat_text here has two inputs, while TextConcat (2lab) has four. The pack clearly added the bigger one in a later pass and never retired the original - classic pack-accumulation. For most prompt work the two-input version is plenty, but if you're joining more than two pieces, reaching for TextConcat saves you a nested chain of these.

    Installing it

    The node rides inside the AI2lab/comfyUI-tool-2lab pack, so you get it as part of the bundle. Easiest path is ComfyUI Manager: search "comfyUI-tool-2lab" and install. Or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AI2lab/comfyUI-tool-2lab
    

    then restart ComfyUI. Dependencies are light - qrcode, Pillow, numpy, torch - and you already have torch. On first launch the pack writes a config.json and a 2lab_key.png QR meant for WeChat binding to the 2lab cloud; for a plain string node that's irrelevant, so ignore it.

    Common issues

    Realistically, this node barely can fail. The main gotcha is the separator default: "," produces comma-joined text, which is what you want for prompts but not for filenames or tags. And if a workflow you downloaded demands concat_text (2lab) specifically, the ComfyUI Manager "missing nodes" prompt will point at the whole pack - install the pack, don't go hunting for a standalone version. One honest caveat: the pack's docs are a thin Chinese README, and there's effectively no English community writing about these nodes, so if something odd happens, it's on you to inspect the chain rather than a forum thread to lean on.

    Category🦊2lab/util/text

    Inputs (3)

    NameTypeDefaultDescription
    text1STRING
    text2STRING
    separatorSTRING,

    Outputs (1)

    NameTypeDescription
    textSTRING