Nodes/comfyui_bmad_nodes/Add String To Many
ComfyUI Node Runs on cloud

Add String To Many

Append one string to a dozen prompts without a dozen extra nodes

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
Add String To Many
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    • STRING
    to_add
    inputs_len3
    operationappend

    You've got eight different prompt strings and one thing you want in all of them - a quality tag, a style token, a character name, a "no text" kicker. Doing that with vanilla nodes means eight concatenation nodes and a wall of spaghetti. Add String To Many exists to make that a one-node job: it appends (or prepends) a single string to every string you feed it, and hands you all the results back.

    It's a classic "utility" node in a pack that's half API glue and half CV - this one lives under Bmad/conditioning because its most common use is injecting text into a batch of prompts before they hit a CLIP Text Encode. The to_add string goes into each input either at the end (append) or the beginning (prepend), which is the other way to think about it: a shared suffix vs. a shared prefix.

    How the inputs work - read this, it's the one tricky part

    • to_add - the string to inject.
    • operation - append or prepend.
    • inputs_len (default 3, min 2, max 32) - how many string pairs are active.

    And here's the gotcha the author flags with a ❔ in the docs: changing inputs_len does nothing until you right-click the node and choose "update I/Os." The widget stores the number; the socket count on the node is applied by the right-click action. Forget it and you'll be staring at three inputs wondering why your "8" didn't take. After updating, you get i1iN string inputs plus to_add, and the same number of STRING outputs, each ready to feed its own text encoder.

    Install

    Ships in bmad4ever/comfyui_bmad_nodes:

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

    Restart, or ComfyUI Manager → search comfyui_bmad_nodes. The pack pins opencv-python~=4.8.1.78 and friends; no models, and this text node touches none of the CV deps anyway.

    Gotchas

    Beyond the "update I/Os" trap, the practical annoyance is that outputs are many separate STRING sockets - you're wiring a bundle of cables, not a list. That's by design (each feeds its own encoder), but if you need the strings as a list for a batch-style node, the pack's list utilities (ToStringList, FromListGetStrings) are the glue. And keep an eye on which side you're injecting: prepend is where style tokens usually go, append is where quality tags land - swapping them changes how the CLIP encoder weighs the text.

    CategoryBmad/conditioning

    Inputs (3)

    NameTypeDefaultDescription
    to_addSTRING
    inputs_lenINT32–32
    operationCOMBOappend2 options: append, prepend

    Outputs (32)

    NameTypeDescription
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING
    STRINGSTRING