Nodes/ComfyUI-JNK-Tiny-Nodes/Join Strings JNK
ComfyUI Node

Join Strings JNK

Glue up to five strings together with a delimiter

By AljnkΒ·Created about a year agoΒ·Updated 12 months agoΒ· 3
Join Strings JNK
    • joined_string
    β—„string1β–Ί
    β—„string2β–Ί
    β—„string3β–Ί
    β—„string4β–Ί
    β—„string5β–Ί
    β—„delimiterβ–Ί

    Join Strings is the pack's answer to "how do I build a string out of parts?" It takes up to five strings and joins them with a delimiter of your choice. Type the parts straight into the node or wire them in from other text nodes - model names, timestamps, prompts, tags - and it concatenates them in order with whatever glue you specify.

    The practical uses are everywhere once you start automating file naming. The classic recipe: feed it the name output from Load Checkpoint Model with Name or Load LoRA with Name, add a _ or - delimiter, append a Get Timestamp value, and you've got a unique, descriptive filename for your save node. Same pattern works for building tags, prompts, or any string that's assembled from pieces.

    Inputs and outputs

    • string1 through string5 - the parts, in order. Plain text widgets by default; wire in STRINGs from other nodes if you prefer.
    • delimiter - what goes between parts. Empty string joins with nothing.

    Output: joined_string.

    One detail worth knowing: empty strings are skipped. If string2 is empty, you get string1 + delimiter + string3, not a double delimiter. That's usually what you want (it keeps filenames clean when optional parts are missing), but it means you can't use an empty slot as a deliberate gap.

    The delimiter also handles escapes: type \n and it becomes a real newline, \t a tab, \r a carriage return. So joining with \n gives you a multi-line block - useful for building prompt blocks or CSV-ish output.

    Installing it

    Pack install: search JNK in ComfyUI Manager, or

    cd ComfyUI/custom_nodes/
    git clone https://github.com/Aljnk/ComfyUI-JNK-Tiny-Nodes.git
    

    No dependencies beyond core.

    Where people get burned

    The two surprises are the empty-string skipping (above) and the escape handling. For the escapes: you type the two-character sequence \n into the delimiter field - a literal backslash-n - and the node converts it. If you actually want a literal backslash-n in your output, there's no escape hatch; the conversion always happens. And if you expected this node to be ",".join() for lists of unknown length, it's not - it's five fixed slots, so a 20-item list needs a different tool (the pack's Split String, or a list-aware joiner). For the filename-building job it was built for, it's the right shape: five slots, one delimiter, done.

    CategoryπŸ”§ JNK

    Inputs (6)

    NameTypeDefaultDescription
    string1STRINGβ€”
    string2STRINGβ€”
    string3STRINGβ€”
    string4STRINGβ€”
    string5STRINGβ€”
    delimiterSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    joined_stringSTRINGβ€”