Nodes/comfyui_txt_mixer/Text Mixer (Concat)
ComfyUI Node

Text Mixer (Concat)

The one-node pack that ends your prompt assembly grind

By stevanisya·Created 7 months ago·Updated 7 months ago· 1
Text Mixer (Concat)
    • text
    separator
    txt_1
    txt_2

    Text Mixer (Concat) is a whole pack that does exactly one thing: it joins several text strings into one string, with a separator you pick. That's it. No API calls, no model files, no Python dependencies beyond the standard library - the entire node is about 30 lines of Python plus a small bit of JavaScript that makes the input slots auto-expand. If you've ever found yourself building prompts from reusable blocks - a fixed subject line, a style block, a stack of quality tags - and getting sick of retyping them into one giant text box, this is the node that lets you stop.

    ComfyUI core gives you text boxes, not a clean way to splice several of them into one string. You can't wire a string into a CLIPTextEncode prompt field the way you wire images around - text fields are typed, so the moment you want to assemble a prompt from parts, you're doing it by hand every time. That's the gap this node sits in. And with the newer LLM-encoded models where the community now recommends structuring prompts in blocks rather than one comma-soup line, a node that joins blocks with a newline separator is genuinely useful, not a gimmick.

    How it works

    Under the hood the node collects every input named txt_1, txt_2, and so on, drops the ones that are empty, and joins the rest with whatever separator you chose. The mapping is exactly what you'd expect: newline → one line break, paragraph → a blank line, space → a space, comma → comma-space, and none → nothing, jammed together. The single text output is a plain STRING, so it plugs straight into a CLIP text encoder, a prompt field, a Show Text node, or anything else that eats a string.

    The pack's real trick is in the frontend. A spare input slot always sits at the end of the node. Connect a wire to it and a new empty slot appears; disconnect one and the empty ones get removed and the rest renumber themselves. It's a small quality-of-life detail, but it's why this beats a fixed-slot node for prompt work - you add a block without hunting for a config toggle.

    The inputs that matter

    Only one is required: separator, an enum with the five choices above. The rest is the txt_1, txt_2, … inputs you connect. The two things a beginner actually needs to know:

    • You can't type into this node. The text slots are marked forceInput, so they're pure input ports. You wire strings in from a text node - the built-in multiline text node, a Show Text, or any custom node that emits STRING - or you're staring at a node that does nothing.
    • Empty slots are silently skipped. Leave txt_2 disconnected and it vanishes from the join, so you never get stray separators. Side effect: if you genuinely want a blank line in the middle of your output, you can't produce one by leaving a slot empty. Feed it a space if you're that desperate.

    The comma separator adds a trailing space after the comma - that's the author's choice, not a bug.

    Installing it

    Zero friction. It ships no requirements.txt and needs no model downloads, which in the custom-node ecosystem is about as rare as a node that works on the first try. Through ComfyUI Manager, search "comfyui_txt_mixer" (or "Text Mixer") and install. Or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/stevanisya/comfyui_txt_mixer
    

    Then restart ComfyUI. The node lives under the UnaCustom category in the node menu - an odd name, but it's the author's own folder, so don't go hunting for "Text" or "Utils".

    Gotchas

    Because the auto-expanding slots are handled by the JS side, the node needs its extension to actually load. If you install it and the spare slot never appears, hard-refresh the browser tab or restart ComfyUI - the Python side works either way, but the expand-and-renumber behavior won't. And the pack is so obscure that community docs basically don't exist for it, so when in doubt, trust the behavior above: it's dead simple, and what you see is what you get.

    For a tiny single-node pack this punches exactly where you'd want it: modular prompts, shared blocks, one clean string out. It won't change your life, but it will stop you from retyping your style block for the hundredth time.

    CategoryUnaCustom

    Inputs (3)

    NameTypeDefaultDescription
    separatorCOMBO5 options: newline, paragraph, none, space, comma
    txt_1optSTRING
    txt_2optSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING