Nodes/ComfyUI-YogurtNodes/String Concat (Yogurt Nodes)
ComfyUI Node

String Concat (Yogurt Nodes)

Stitch up to eight strings together, and toggle each one

By yogurt7771·Created 2 years ago·Updated 4 days ago· 1
String Concat (Yogurt Nodes)
    • result
    separator
    enable1true
    text1
    enable2true
    text2
    enable3true
    text3
    enable4true
    text4
    enable5true
    text5
    enable6true
    text6
    enable7true
    text7
    enable8true
    text8

    String Concat is the pack's glue node: it joins multiple strings with a separator you choose, and the thing that makes it worth having over a dozen hand-wired + nodes is the per-input on/off switch. Each of the eight text inputs has an enable toggle, so you can leave slots wired into a workflow and turn them on and off without rewiring anything.

    The core behavior is exactly what you'd expect: separator is the required string that goes between parts, and the optional inputs are enable1enable8 paired with text1text8. Output is a single result string. The practical shape of it: build a prompt from parts - subject, style, quality tags, negative sections - where every part can be individually enabled or disabled, and the separator only appears between enabled parts. Disable the style block and your string cleanly shrinks; no empty separator slop, no double spaces.

    When you'd actually use it

    Three spots. Prompt building is the big one: wire each clause from a different source (an LLM node, a wildcard, a text node) and toggle blocks per run. Filename construction pairs beautifully with Split Path - stem + separator + variant + suffix. CSV or log lines: join fields with a comma separator and feed the result to a Save Text Bridge for dataset work. In every case the enable toggles are what separate this from a plain "join these five strings" node - they turn it into a small routing primitive.

    Install

    Same one-pack install:

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

    or ComfyUI Manager → ComfyUI-YogurtNodes → install → restart. It's under Yogurt Nodes → String.

    Gotchas

    A few things worth knowing. The separator is only inserted between parts that are actually enabled and non-empty - a disabled input leaves no trace, which is the good kind of surprise. An empty separator with multiple parts gives you plain concatenation, which is fine, but be deliberate about it. And if a part is empty because its source node produced nothing, an empty-but-enabled input can leave a double separator behind; if you're building filenames or paths that need to be exact, keep the toggles in sync with what's actually flowing, or feed the result through a cleanup step. For prompt work it usually doesn't matter - CLIP doesn't care about a stray comma.

    CategoryYogurtNodes/String

    Inputs (17)

    NameTypeDefaultDescription
    separatorSTRING连接符号
    enable1optBOOLEANtrue第1个文本输入是否启用
    text1optSTRING第1个文本输入
    enable2optBOOLEANtrue第2个文本输入是否启用
    text2optSTRING第2个文本输入
    enable3optBOOLEANtrue第3个文本输入是否启用
    text3optSTRING第3个文本输入
    enable4optBOOLEANtrue第4个文本输入是否启用
    text4optSTRING第4个文本输入
    enable5optBOOLEANtrue第5个文本输入是否启用
    text5optSTRING第5个文本输入
    enable6optBOOLEANtrue第6个文本输入是否启用
    text6optSTRING第6个文本输入
    enable7optBOOLEANtrue第7个文本输入是否启用
    text7optSTRING第7个文本输入
    enable8optBOOLEANtrue第8个文本输入是否启用
    text8optSTRING第8个文本输入

    Outputs (1)

    NameTypeDescription
    resultSTRING