Nodes/ComfyAngel/Text Combine πŸͺ½
ComfyUI Node

Text Combine πŸͺ½

Join anything into a string β€” no script required

By ThepExcelΒ·Created 8 months agoΒ·Updated about a month agoΒ· 14
Text Combine πŸͺ½
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • input_10
  • text
  • count
β—„delimiternewlineβ–Ί
β—„custom_delimiter | β–Ί
β—„skip_emptytrueβ–Ί
β—„trim_whitespacetrueβ–Ί

Text Combine is the node you reach for when "assemble this sentence out of parts" would otherwise mean five nodes and a reroute. It takes up to ten inputs of any type, converts each one to text, and joins them with a delimiter you choose. One output, one string, no programming.

The trick that makes it more useful than a plain "text joiner" is that it doesn't care what you feed it. Strings are the obvious case, but it will happily stringify numbers, booleans, tensors, lists, and dicts. That turns it into a mini "describe anything" utility: wire in a seed, an image, and a label, and it produces a readable status line you can hand to a filename or a text-overlay node. It's genuinely handy for building labels for the pack's own Parameter Overlay and Custom Text Overlay nodes, or for debugging what a value actually is mid-graph.

How it works

Each input runs through a _to_string converter that's smarter than a raw str(). Numbers get cleaned up (trailing zeros dropped, 5.0 becomes 5), booleans become "true"/"false", a scalar tensor becomes its value, a 4-D tensor becomes something like Tensor[1x512x512x3] float32, a list of scalars becomes a comma-joined string, and a dict becomes key=value pairs. Then everything is joined with the delimiter and returned.

One thing worth calling out: the node marks itself as an output node, so after each run it previews the combined text right in the node. You can see what you built without adding a Preview Text node.

Inputs and outputs that matter

  • delimiter - the join separator, default newline. Presets are newline, space, comma, comma_space, pipe, tab, none, and custom.
  • custom_delimiter - only used when delimiter is custom; defaults to " | ".
  • input_1 through input_10 - any type, all optional. input_1 is the one you actually need; the rest are gravy.
  • skip_empty - default true: empty strings are dropped, so you don't end up with stray delimiters.
  • trim_whitespace - default true: leading/trailing whitespace is stripped per input before joining.

Outputs are text (the combined string) and count (how many non-empty inputs actually made it in - useful if you're checking whether all your parts arrived).

Where people get confused

The "any type" flexibility cuts both ways. There's no strict mode: pass in an image tensor and it won't error, it'll just describe it as Tensor[...] in the middle of your sentence. Great for debugging, surprising if you assumed it would reject non-text. Order matters - inputs join in input_1 to input_10 order, so wire them in the order you want them spoken. And count counts joined values, not the ten sockets.

Installing

Install via ComfyUI Manager (search ComfyAngel) or:

cd ComfyUI/custom_nodes
git clone https://github.com/ThepExcel/ComfyAngel

Restart ComfyUI afterward. The pack's only dependency is Pillow - no models, no heavy installs.

CategoryComfyAngel/Utility

Inputs (14)

NameTypeDefaultDescription
delimiterCOMBOnewline8 options: newline, space, comma, comma_space, pipe, tab, +2
input_1opt*β€”
input_2opt*β€”
input_3opt*β€”
input_4opt*β€”
input_5opt*β€”
input_6opt*β€”
input_7opt*β€”
input_8opt*β€”
input_9opt*β€”
input_10opt*β€”
custom_delimiteroptSTRING | β€”
skip_emptyoptBOOLEANtrueβ€”
trim_whitespaceoptBOOLEANtrueβ€”

Outputs (2)

NameTypeDescription
textSTRINGβ€”
countINTβ€”