Nodes/ComfyUI_AITECCAFE_Toolkit/πŸ”— AITEC String Merge
ComfyUI Node

πŸ”— AITEC String Merge

A three-slot string joiner with per-slot kill switches

By AI-TECΒ·Created about a year agoΒ·Updated about a month agoΒ· 4
πŸ”— AITEC String Merge
    • merged_string
    β—„use_string1trueβ–Ί
    β—„use_string2trueβ–Ί
    β—„use_string3falseβ–Ί
    β—„string1β–Ί
    β—„string2β–Ί
    β—„string3β–Ί

    This is the unglamorous one in the AITECCAFE Toolkit, and it's also the one with zero dependencies. AITEC String Merge takes up to three strings and joins them in order with a space-newline separator (" \n") between whatever's enabled. That's the whole job. No template syntax, no separators to pick, no variables.

    What saves it from being pure filler is the use_string1/2/3 toggles. They let you build a "modular" prompt without deleting text: keep three building blocks on the canvas, and switch whole segments in and out by flipping a boolean. The node also skips any empty string even when its toggle is on, so you can leave a slot blank and it just quietly drops out of the join.

    The inputs are honest:

    • string1, string2, string3 - the text (optional, all default empty)
    • use_string1/2/3 - whether to include each one (booleans, all default on except string3)

    One output, merged_string (STRING), which is the three enabled pieces joined in order. Wire it into any text slot - CLIP text encoders, filename builders, the pack's own LLM Chat prompt input.

    Where you'd actually reach for it: it's a competent little tool for toggling a subject, style, or quality block in and out of a prompt without losing the text. Where it's not the right call: if you need arbitrary-length concatenation, custom delimiters, or template injection, a proper prompt-builder or a text-template node is what you want. Three fixed slots is three fixed slots.

    One quirk from the source worth knowing: the join is " \n".join(...) - a space and a newline between parts. That's usually harmless for CLIP (newlines get collapsed by the tokenizer), but if you're building a filename or something whitespace-sensitive, expect the newline to be there.

    Install is the pack-wide path - and this is the one node where you might reasonably skip it, since installing this pack for a string joiner means pulling tensorflow and opennsfw2 down with it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AI-TEC/ComfyUI-AITECCAFE-Toolkit
    pip install -r ComfyUI-AITECCAFE-Toolkit/requirements.txt
    

    Or search "AITECCAFE" in ComfyUI Manager. The node itself needs nothing but the standard library; the heavyweight requirements.txt exists to serve the pack's moderation and LLM nodes.

    Honest verdict: a thin utility node that does one thing correctly. If it solves your toggling problem, great. If it doesn't have the features you need, you're not missing much - but as part of a pack you're already installing for the LLM or loader nodes, it's a free convenience.

    CategoryAITECCAFE-Toolkit

    Inputs (6)

    NameTypeDefaultDescription
    use_string1BOOLEANtrueβ€”
    use_string2BOOLEANtrueβ€”
    use_string3BOOLEANfalseβ€”
    string1optSTRINGβ€”
    string2optSTRINGβ€”
    string3optSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    merged_stringSTRINGβ€”