Nodes/comfyui-fb-utils/FB String Join
ComfyUI Node

FB String Join

Glue a list of strings back into one — the other half of split

By FredBill1·Created 2 years ago·Updated about a year ago· 3
FB String Join
  • value
  • STRING
delimiter,
delimiter_as_raw_strfalse

FB String Join is the inverse of FB String Split. It takes a STRING_LIST and a delimiter, and collapses the whole list into a single string. If you've split a prompt, filtered or rebuilt its pieces, or generated a list of tags elsewhere, this is the node that hands you back one clean text blob to feed into your text encoder.

It's a one-trick node, but it's the exact trick that makes the whole string-toolbox story coherent: split things apart, reshape them, join them back.

How it works

The node runs delimiter.join(value) - every item in the list concatenated together with your delimiter between them. Nothing clever, no trimming, no deduplication. The one subtlety is the delimiter_as_raw_str flag:

  • delimiter_as_raw_str off (default) - the delimiter string is decoded as a Python unicode-escape sequence first. That means typing \n in the field joins your list with real newlines, and \t gives tabs. If your delimiter is literally backslash-n, keep this off.
  • delimiter_as_raw_str on - the delimiter is used exactly as typed, so \n is two literal characters.

Inputs and outputs

  • value - the STRING_LIST to join.
  • delimiter - the glue string, default ,.
  • delimiter_as_raw_str - whether to interpret the delimiter's escape sequences.
  • STRING - the joined output.

Where it fits

The obvious pair-up is with the pack's own nodes: feed it the STRING_LIST from FB Multiline String List and you've turned a block of prompt lines into a single comma-separated prompt in one step. Or round-trip with FB String Split - split a CSV, drop or reorder items, join back with a different delimiter. Building a file path from parts, or assembling a filename prefix, works the same way.

And because the output is a plain STRING, anything downstream that takes text is fair game - no need to convert types.

Gotchas

  • An empty list produces an empty string. Nothing to join, nothing returned. If the list came from a node that can be disabled (like the pack's own Multiline String List with enabled off), you'll silently get "" - usually fine, but don't build a filename from it and expect a name.
  • No trimming. If list items carry stray whitespace, the joined string carries it too. Chain into FB String Strip after the join if you need to clean up.
  • The delimiter is a literal string. Want ", "? Type ", " with the space. The escape decoding only handles backslash sequences, and you can turn that off with the flag if it ever bites you.

Install

Standard for this pack - no dependencies, no models, just the clone:

cd ComfyUI/custom_nodes
git clone https://github.com/FredBill1/comfyui-fb-utils

Restart ComfyUI and the node appears under the FredBill1 category (ComfyUI Manager: search comfyui-fb-utils). The whole pack is pure Python standard library, so there's no requirements.txt, no pip step, and nothing that can break your existing install. Worth repeating for this pack: the README is one line, so the code is the documentation - and for a join node, there's not much code to argue with.

CategoryFredBill1

Inputs (3)

NameTypeDefaultDescription
valueSTRING_LIST
delimiterSTRING,
delimiter_as_raw_strBOOLEANfalse

Outputs (1)

NameTypeDescription
STRINGSTRING