Nodes/ComfyUI_SZtools/山竹文本合并
ComfyUI Node

山竹文本合并

Three text strings in, one comma-joined string out. That's the whole node.

By Rocky-Lee-001·Created about a year ago·Updated about a year ago· 2
山竹文本合并
    • text
    text_1
    text_2
    text_3

    ShanZhuTextJoin is the pack's glue node, and it does exactly one thing: take up to three text inputs and join the non-empty ones with ", ". text_1 is required; text_2 and text_3 are optional. Empty strings are skipped entirely, so you can leave inputs disconnected and the result just uses what's there. The single output is a text STRING you can feed into anything that eats a prompt or caption.

    Why it exists: in the pack's Kontext dataset workflow it sits between a Florence2 captioner and the TSZImageTaggerSave node. That's the "reverse inference prompt word" node the README mentions - the interrogator produces a raw machine caption, and this lets you append your own tags (trigger words, style qualifiers, the actual edit instruction) without hand-editing every line of the batch. It's the comma-splice of the graph.

    A couple of implementation details worth knowing. It uses ', '.join(texts), so there's no separator option - if you need newlines or no space, this node won't do it, and any generic text-concat utility (WAS, Efficiency, or a plain "text box" pair) gives you that flexibility. And it round-trips through Python's unicode-escape before returning, a small guard so non-ASCII text (Chinese tags, say) survives the join unmangled. In practice you'll never notice it doing anything - which is the point.

    Install is the shared pack story: ComfyUI Manager search "ComfyUI_SZtools", or git clone https://github.com/Rocky-Lee-001/ComfyUI_SZtools into custom_nodes/, then restart. No extra dependencies beyond what ComfyUI already ships.

    The honest take: this is a two-minute reimplementation of a thousand existing text-join nodes, and if the pack's Kontext saver nodes weren't the reason you installed it, you wouldn't install it for this. But it's the node the author's own example workflow uses, it has essentially no failure modes, and when you're following a Chinese-ecosystem tutorial, using the pack's own glue keeps everything consistent with what the workflow expects.

    Category山竹文本合并

    Inputs (3)

    NameTypeDefaultDescription
    text_1STRING
    text_2optSTRING
    text_3optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING