Nodes/ComfyUI-GU_Nodepack/GU Concat Strings
ComfyUI Node

GU Concat Strings

Glue strings together without building filenames by hand

By alexguryev·Created 4 months ago·Updated 23 days ago· 2
GU Concat Strings
    • STRING
    inputs2
    delim_
    isfilefalse

    GU Concat Strings is the plumbing node you reach for when your workflow has turned into a pile of loose strings that need to become one string - usually a filename, sometimes a prompt. It concatenates up to ten inputs with a configurable separator, skips the empty ones, and optionally sanitizes the result so it's safe as a filename. That's the whole job, and it does it without drama.

    The default delim is _, which tells you what the author built it for: assembling names like project_style_lora_seed from separate blocks rather than typing the whole thing out and re-typing it every time you change one part.

    How it works

    Three controls on the node:

    • inputs - how many string slots to show. Set it (2 to 10) and click Update inputs; the node grows the extra str_N inputs. This is the classic "dynamic widget count" pattern from the GU pack.
    • delim - the separator, default _.
    • isfile - a flag that says "the output is going to be a filename." When it's on, the result is run through the pack's filename sanitizer, which swaps forbidden characters for _. Leave it off and you get a raw concatenation for things like prompts.

    Empty inputs are skipped entirely, so you can leave slots blank without producing a__b instead of a_b.

    One output, a single STRING, which you feed into whatever wants the assembled text - a Save Image filename, a GU Project Path filename input, a prompt encoder, anywhere a string goes.

    The old-ComfyUI warning

    The node's own description carries a warning in caps: on older ComfyUI versions, spurious inputs str_-2, str_-1, str_0 may appear - don't use them. That's a real thing that happened with dynamic widgets on old frontends, and the author is telling you to ignore those phantom slots rather than wire anything into them. If you're on a current ComfyUI (2025+), you likely won't see them at all.

    Install

    No models, no heavy dependencies. Fastest: ComfyUI Manager → Custom Nodes Manager → search "GU Nodepack" → Install → restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexguryev/ComfyUI-GU_Nodepack
    cd ComfyUI-GU_Nodepack
    pip install -r requirements.txt
    

    The deps are just psutil, requests, and gu-funclib>=1.9.0 - nothing exotic. Windows is the tested platform; elsewhere is best-effort, and the pack assumes a single-user instance.

    Where people get burned

    The classic mistake is mixing up isfile with "I want a filesystem path." It's not that - it's only about sanitizing characters. Slashes in the output are still slashes; if you feed the result to a path builder, that builder decides about folders. If you're assembling filenames that include seed or version numbers coming from upstream nodes, wire those in as inputs rather than typing them, and keep the slots you aren't using empty - the skip-empty behavior means you can leave one project permanently blank and the name stays clean.

    CategoryGU_Nodepack

    Inputs (3)

    NameTypeDefaultDescription
    inputsINT22–10
    delimSTRING_
    isfileBOOLEANfalseuse output for filename?

    Outputs (1)

    NameTypeDescription
    STRINGSTRING