Shima String Concat
Glue up to four strings together without thinking about separators
- string
Prompt building in ComfyUI is mostly string surgery: base prompt plus style tag plus quality suffix, joined with the right separator, with a comma where a comma belongs. Shima StringConcat is a four-input string joiner that takes the separator decision out of your hands - pick Space, Comma, Newline, or a custom separator and it joins whatever inputs are actually connected, skipping the empty ones.
It's the "many values into one" counterpart to the pack's String primitive. Where String is a single authoritative source that fans out, Concat is the collection point: gather a style name, a subject, and a quality token from different nodes, and emit one combined string for your prompt box or CLIP encoder.
The inputs
separator-None(just concatenates),Space,Comma,Newline, orCustom. The default isNone, so out of the box the node concatenates with no glue at all - wire inCommaor a custom separator if you want readable joins.custom_separator- used only whenseparatorisCustom. Type anything, including multi-character glue like" | ".string_1throughstring_4- the inputs. All optional; unconnected ones are skipped, so you can leave holes without getting stray separators. Order is preserved:string_1first, then 2, 3, 4.allow_external_linking- the pack's Use Everywhere toggle, off by default.
Output: string, the joined result.
How it behaves
The join is separator.join(values) on the non-None inputs, which means two things. First, a missing middle input is fine - with a comma separator, ["a", None, "b"] becomes "a, b", not "a, , b". Second, every input is coerced with str(), so wiring an INT in works, though it's clearly meant for strings.
Installing it
Part of KDB-USJP/shima_wf:
cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf
Restart ComfyUI. No special dependencies.
The honest take
Four inputs and a separator is a modest feature set - if you need to join more than four pieces or want to reorder at runtime, you'll outgrow it fast. But for the common "assemble a prompt from parts" job it's cleaner than hand-typing a prompt with placeholders, and the skip-empty behavior means you can wire in optional branches and get a sensible string no matter which are live. Where people stumble: forgetting that Comma inserts a comma-space. If you're building something delimiter-sensitive (a CSV, a tag list that must not contain spaces), switch to Custom and type the exact separator you need.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | COMBO | 5 options: None, Space, Comma, Newline, Custom | |
| custom_separator | STRING | — | |
| string_1opt | STRING | — | |
| string_2opt | STRING | — | |
| string_3opt | STRING | — | |
| string_4opt | STRING | — | |
| allow_external_linkingopt | BOOLEAN | false | If ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |