Nodes/wlsh_nodes/Simple String Combine (WLSH)
ComfyUI Node

Simple String Combine (WLSH)

Glue two strings together without a code node

By wallish77·Created 3 years ago·Updated 2 years ago· 144
Simple String Combine (WLSH)
    • combined
    addition
    placement
    separator
    input_string

    Prompts in a real workflow rarely stay as one static block of text - you end up wanting a base description that changes and a suffix that doesn't (a fixed style tag, a trigger word for a LoRA, a quality-boost phrase), or the reverse: a fixed intro with a variable ending. This node does the boring-but-necessary job of sticking two strings together with the separator and order you actually want, so you're not hand-editing a combined prompt every time one half of it changes.

    How it works. addition is the text you're gluing on - required, always present. input_string is optional, and that's the base text you're attaching addition to; leave it disconnected and the node effectively just passes addition through (useful if you're building a pipeline where the base string sometimes doesn't exist yet, or you're using this node just to normalize formatting). placement decides whether addition goes before or after input_string, and separator controls what sits between them - comma, space, newline, or none at all, covering the common cases without you needing a text-manipulation node that does everything.

    Inputs: addition (required, multiline), placement (before/after), separator (comma/space/newline/none), and input_string (optional, multiline - your base text). Output: combined, the finished string - wire it into a CLIP text encode node, or chain another Simple String Combine (WLSH) after it if you're building up a prompt from more than two pieces.

    Installing it

    ComfyUI Manager: search "wlsh_nodes" or "WLSH Nodes", install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/wallish77/wlsh_nodes, then restart ComfyUI.

    Common issues

    The main thing to get right is placement - it's easy to leave it on the wrong setting after copy-pasting a node and end up with your style suffix appearing at the start of the prompt instead of the end (or vice versa), which usually doesn't error, it just quietly changes how much weight the two halves carry in the generation, since earlier tokens tend to matter more to most text encoders. If your combined string doesn't look how you expected, check placement and separator before assuming the input text itself is wrong. And if you're chaining several of these to build a longer prompt from parts, keep an eye on which node's combined output is actually feeding the next one's input_string - a common mistake when a graph gets busy is wiring a later Simple String Combine to the wrong upstream node and silently dropping an earlier piece of the prompt.

    CategoryWLSH Nodes/text

    Inputs (4)

    NameTypeDefaultDescription
    additionSTRING
    placementCOMBO2 options: after, before
    separatorCOMBO4 options: comma, space, newline, none
    input_stringoptSTRING

    Outputs (1)

    NameTypeDescription
    combinedSTRING