Nodes/Mikey Nodes/Text Concat (Mikey)
ComfyUI Node

Text Concat (Mikey)

Join up to five text strings with one delimiter

By bash-j·Created 3 years ago·Updated 10 months ago· 188
Text Concat (Mikey)
    • STRING
    delimiter
    text1
    text2
    text3
    text4
    text5

    Text Concat is the kind of node you don't think you need until you're three text-manipulation nodes deep in a graph trying to build one compound string out of pieces scattered across your workflow - a style tag here, a subject description there, a wildcard result somewhere else - and you realize there's no clean way to just glue them together. This node exists for exactly that: up to five optional text inputs, joined with a delimiter of your choosing, in one step.

    Typical uses: building a final prompt string out of separate reusable pieces (a base description plus a style suffix plus a quality tag), assembling a filename out of parts (a date string, a checkpoint name, a seed), or combining outputs from other utility nodes in the pack - say, a Float to String result and a Checkpoint Hash result - into one readable label before it goes into Add Metadata.

    The inputs that matter: delimiter is required and defaults to a single space - set it to a comma, a dash, an underscore, or anything else depending on what you're building. text1 through text5 are all optional string inputs, each defaulting to empty, meaning you only need to connect as many as you're actually using - leaving the rest disconnected doesn't break anything. The output is a single STRING, everything joined together.

    Installing it

    Comes with the full Mikey Nodes pack. Through ComfyUI Manager, search "Mikey Nodes." Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bash-j/mikey_nodes
    

    Restart ComfyUI. No models or dependencies needed - this is plain string handling.

    Common issues

    Because unconnected text slots default to empty strings rather than being skipped entirely, you can end up with stray delimiters in your output if you leave a middle slot (say, text2) disconnected while text1 and text3 are wired in - you'll get your delimiter inserted around the empty gap, which can look like a doubled separator or an awkward blank spot in the final string. If that happens, either fill every slot you're using contiguously from text1 onward, or plan for the gap and strip it with a downstream text-cleanup step if one's available in your graph.

    Beyond that, it's a genuinely low-drama node - deterministic, no external dependencies, does one small job. If your combined string looks wrong, it's almost always either a delimiter choice that doesn't suit the content, or an unconnected slot you forgot about, rather than anything deeper.

    One more thing worth knowing: this node doesn't trim or dedupe anything for you. If two of your inputs both end up carrying similar text (say, a subject description that already contains the word "portrait" and a quality tag that also says "portrait"), Text Concat won't notice or clean that up - it just joins strings, it doesn't understand what's inside them. That's fine for most prompt-building and filename use cases, but if you're chaining several of these together to assemble something more complex, it's worth eyeballing the final combined string at least once before trusting it in a batch run, since a small formatting mismatch upstream compounds every time it gets concatenated again downstream.

    CategoryMikey/Text

    Inputs (6)

    NameTypeDefaultDescription
    delimiterSTRING
    text1optSTRING
    text2optSTRING
    text3optSTRING
    text4optSTRING
    text5optSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING