Nodes/ComfyUI_ScarlotSoft/ScarlotSoft String Concat
ComfyUI Node

ScarlotSoft String Concat

Twenty inputs, one string — the prompt joiner that grows its own sockets

By scarlotsoft·Created 2 months ago·Updated about a month ago· 0
ScarlotSoft String Concat
    • STRING
    input_0
    input_1
    input_2
    input_3
    input_4
    input_5
    input_6
    input_7
    input_8
    input_9
    input_10
    input_11
    input_12
    input_13
    input_14
    input_15
    input_16
    input_17
    input_18
    input_19

    ScarlotSoft String Concat is a text-joining node with a party trick: it starts with one socket, and every time you connect another string it grows another one, up to twenty input_0 through input_19 slots. Feed it pieces of a prompt from different sources - a tagger's output, a style phrase, a LoRA trigger, a fixed prefix - and it glues them together into one string, joined with spaces, with any empty inputs skipped.

    The mechanism is exactly as unglamorous as you'd hope. All twenty inputs are optional STRING sockets marked forceInput, so you never type into them - they exist to be wired. The node filters out anything empty, sorts the connected values by socket number, and joins them with a single space. input_0 before input_1 before input_2, no surprises. The dynamic socket growth is frontend work (the JS trims unused trailing sockets and adds one whenever the last one gets connected), so it looks tidy on the canvas instead of showing you a wall of twenty empty ports.

    Why would you reach for it over typing a prompt into a CLIP Text Encode? Because the prompt is assembled at runtime from parts that change. The classic setup: wire a WD14 tagger's output into input_0, a fixed style string into input_1, and you get "1girl, solo, long hair, masterpiece, best quality" without ever retyping it. Change the source image and the whole prompt updates. It's the same "one value, fan it out / assemble it from pieces" pattern that all the plumbing nodes exist for (see the KB's node-plumbing doc) - repetition and illegibility are the two enemies, and this fights both.

    The single output is a STRING you can feed into any text slot - a CLIP Text Encode, a prompt builder, a metadata node - by converting that widget to an input.

    Install

    Part of the ComfyUI_ScarlotSoft pack. ComfyUI Manager → search "ScarlotSoft" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/scarlotsoft/ComfyUI_ScarlotSoft
    

    Then restart ComfyUI. No dependencies beyond what ComfyUI already has - this is pure string handling.

    The honest take

    There are a dozen prompt-concat nodes out there, and core ComfyUI's Text Concatenate and the primitive system cover most of this ground. What this one does differently is the auto-growing socket list and the automatic skipping of empty inputs, which genuinely removes a class of "why is my prompt full of double spaces" noise. It's a small convenience, not a revolution - and it's fine that way. If you're already running this suite for the tagger or the detailer, it slots in cleanly and you'll use it more than you expect. If you're deciding between this and rgthree or core nodes based purely on capability, they're interchangeable; pick the one whose canvas you like looking at.

    One quirk: it only joins with spaces. If you need commas (the Danbooru-tag convention) or periods, that's what the suite's other joiner - ScarlotSoft String Concat DINO - is for.

    CategoryScarlotSoft/Utils

    Inputs (20)

    NameTypeDefaultDescription
    input_0optSTRING
    input_1optSTRING
    input_2optSTRING
    input_3optSTRING
    input_4optSTRING
    input_5optSTRING
    input_6optSTRING
    input_7optSTRING
    input_8optSTRING
    input_9optSTRING
    input_10optSTRING
    input_11optSTRING
    input_12optSTRING
    input_13optSTRING
    input_14optSTRING
    input_15optSTRING
    input_16optSTRING
    input_17optSTRING
    input_18optSTRING
    input_19optSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING