Nodes/Clh Tool for ComfyUI/JoinStringMulti_clh
ComfyUI Node

JoinStringMulti_clh

Glue several strings together with a delimiter

By clhui·Created 2 years ago·Updated 10 months ago· 9
JoinStringMulti_clh
    • string
    delimiter
    inputcount2
    string_1
    string_2

    You've got a prompt split across a few nodes - a base description here, a style suffix there, a quality tag from a constant node - and you need them stitched into one string with spaces or commas between them. This node does that. Set how many inputs you want, wire your strings in, pick a delimiter, and out comes the concatenation. It's the string-glue node, and if you build prompts modularly it earns its keep.

    If this feels familiar, it should: it's the same design as KJNodes' JoinStringMulti, right down to the "set the input count and click update" mechanic. The clh pack rebuilds a handful of well-known utility nodes like this one, so you're on solid, well-trodden ground here even if the pack itself is obscure.

    How it works

    The trick that makes it flexible is the dynamic input count. Instead of a fixed two or three string slots, you tell it how many inputs you want via the inputcount field, click the node's update button, and it grows (or shrinks) to that many string sockets. So the same node handles "join 2 strings" and "join 12 strings" - you resize it to the job. Then it concatenates them all in order, dropping your delimiter between each.

    The node's own description says it plainly: it "creates a single string, or a list of strings, from multiple input strings," and you "set how many inputs the node has with the inputcount and clicking update." That's the whole mental model.

    The inputs and outputs that matter

    • inputcount (default 2, up to 1000) - how many string sockets you want. Set it, then click the node's update button to actually add or remove the sockets. This is the step people miss.
    • delimiter (default a single space) - what goes between each joined string. A space for natural-language prompts, , for tag-style prompts, an empty value to jam them together with nothing between, \n for line breaks.
    • string_1, string_2, … - the strings themselves. Two exist by default; the rest appear when you raise inputcount and update. Wire in outputs from prompt nodes, constants, or anything that emits text.

    Output is a single string - everything joined, in socket order. Wire it into your CLIP Text Encode, or into another text node for further processing.

    Installing it

    ComfyUI Manager: search Clh Tool for ComfyUI, install, restart. Or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/clhui/ComfyUi-clh-Tool
    

    and restart ComfyUI. If a manual clone doesn't show the node, the startup console will flag any missing dependency to pip install - Manager does that automatically, a bare clone doesn't.

    Common issues

    The classic snag is forgetting to click update after changing inputcount. You bump it to 5, nothing happens, you're confused - because the sockets only appear when you trigger the node's update. Change the count, click update, then the new inputs show up.

    The other everyday one is the delimiter. Default is a single space, which is right for prose prompts but wrong for tag lists - if your output reads masterpiece detailed 8k when you wanted masterpiece, detailed, 8k, your delimiter is a space and you wanted , . And watch empty inputs: an unwired or blank string socket in the middle can leave you with doubled delimiters (a, ,b) depending on how your downstream encoder treats them. Fill the sockets you count, or lower the count to match what you're actually wiring. Pair it with StringConstant clh for the fixed bits (a style suffix, a quality tag) and this node becomes the assembly point for a tidy, modular prompt.

    CategorysimpleTool_clh

    Inputs (4)

    NameTypeDefaultDescription
    delimiterSTRING
    inputcountINT22–1000
    string_1STRING
    string_2STRING

    Outputs (1)

    NameTypeDescription
    stringSTRING