ComfyUI Node

Merge Strings

Join your prompt parts with one comma

By r-vage·Created about a year ago·Updated 5 months ago· 23
Merge Strings
  • any_1
  • any_2
  • any_3
  • any_4
  • any_5
  • string
Delimiter,

Merge Strings takes up to five text inputs and joins the non-empty ones into a single string with a delimiter you choose - default is a comma plus a space, so it's built for assembling prompt fragments. Subject from one node, style tag from another, quality booster from a third: out the other end comes one tidy prompt string ready for a CLIP Text Encode.

The author's framing for this whole pack is that they built what they kept needing in their own workflows, and this node is a poster child. Prompt assembly is the most common string task in ComfyUI, and the reason it's a node rather than something you type is that your prompt parts rarely live in one place - they come from wildcard systems, lora trigger-word helpers, style presets, and prompt-randomizers that each hand you a string. Merging is how you composite them without pasting text around the canvas.

The details that matter

  • any_1 through any_5 (any type, optional) - five inputs. They're typed as *, meaning they accept almost anything, but here's the catch: only actual strings get joined. If you wire a number or an image or a model object into one of these slots, it's silently skipped, not converted. That's usually what you want - empty or non-text inputs just vanish - but it means numbers won't become text for you (feed an Integer to String converter first).
  • Delimiter (STRING, default ", ") - the joiner. Set it to "\n" and the node treats it as a real newline, which is handy for multi-line prompts or caption blocks.

One behavior worth flagging: inputs are joined in sorted slot order, and non-empty strings only. So empty inputs don't leave dangling commas - a genuinely nice touch that keeps subject, , style from ever appearing.

Installing it

Part of ComfyUI-RvTools_v2:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-RvTools_v2

Restart ComfyUI or install via ComfyUI Manager (search "RvTools"). No model downloads; dependencies are the standard stack plus opencv-python, pilgram, pynvml, piexif.

Gotchas

The README marks the pack no longer maintained, with ComfyUI_Eclipse (same author) as the successor. The v2 nodes still work fine.

Two things to remember. First, the "only strings join" behavior is the most common source of surprise - expect numbers to be ignored unless you convert them first. Second, the 5-slot version joins in clean slot order, but the pack's 10-input "Large" sibling sorts inputs lexicographically, which puts any_10 before any_2 - if you're using the Large version with many slots, that ordering quirk is real. For this one, slot order is exactly what you'd expect.

Category🫦 RvTools II/ Text

Inputs (6)

NameTypeDefaultDescription
any_1opt*
any_2opt*
any_3opt*
any_4opt*
any_5opt*
DelimiteroptSTRING,

Outputs (1)

NameTypeDescription
stringSTRING