Nodes/ComfyUI_ScarlotSoft/ScarlotSoft String Concat DINO
ComfyUI Node

ScarlotSoft String Concat DINO

The string joiner that speaks GroundingDINO — dots are the whole point

By scarlotsoft·Created 2 months ago·Updated about a month ago· 0
ScarlotSoft String Concat DINO
    • DINO_PROMPT
    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 DINO is the sibling of the suite's plain String Concat, and the difference is a punctuation mark: instead of joining your strings with spaces, it joins them with ". " and guarantees the result ends in a period. That may sound pedantic until you remember what it's feeding.

    GroundingDINO - the text-prompted object detector that teams up with SAM in the Grounded-SAM combo (covered in the KB's masking-detection doc) - takes its query as a string of phrases. The convention is that each phrase is its own sentence separated by periods: "a red dress. a person. a dog." gets you boxes around all three. Comma-separated and space-joined prompts get misparsed or come back with fewer detections than you asked for. This node is built to produce exactly that format.

    The mechanism is small but deliberate. Up to twenty input_0input_19 string sockets, same auto-growing UI as its sibling. Before joining, it strips each incoming string of trailing whitespace and any stray dots you typed - so "1girl." and "1girl" both come out clean - then joins with ". " and appends a final period. The output socket is even named DINO_PROMPT so you can't mistake what it's for.

    The workflow it wants to live in: several strings feeding this node, its STRING output wired into a GroundingDINO box-prompt input (or a Grounded-SAM style pipeline), and the resulting boxes turned into masks for inpainting or detailing. If you're assembling a multi-object query from parts - a tagger feeding subject tags, a fixed prefix feeding a style qualifier - this saves you from hand-formatting "dog. cat. bird." every time.

    Install

    Same pack, same steps as every ScarlotSoft node. ComfyUI Manager, search "ScarlotSoft", install, restart. Or:

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

    Restart. No extra dependencies for this node itself - though whatever detector you pipe its output into (Ultralytics, Grounded-SAM, Impact Pack) will bring its own.

    The honest take

    If you never touch GroundingDINO, you don't need this node - the plain String Concat will do, or core ComfyUI's concatenation nodes. But the niche is real: DINO prompt formatting is finicky, and a node that enforces the period convention for you removes one fiddly failure mode from a pipeline that already has plenty. Keep in mind it only formats; it doesn't validate that your phrases are things DINO actually recognizes. Garbage in, garbage out - the periods just make the garbage easier for DINO to read.

    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
    DINO_PROMPTSTRING