Nodes/comfyui-moonpack/Dynamic String Concat (legacy)
ComfyUI Node

Dynamic String Concat (legacy)

Same auto-expanding prompt builder, new prefix

By moonwhaler·Created about a year ago·Updated 11 days ago· 16
Dynamic String Concat (legacy)
    • text
    separator
    ignore_emptytrue
    strip_whitespacetrue
    newline_between_inputsfalse
    newline_wrapped_separator
    prefix
    suffix
    template

    Found a node in your saved workflow called DynamicStringConcat and a "(legacy)" warning next to it? Relax - it's the current node, just registered under MoonPack v0.1's old key. In v0.2 the pack renamed everything to a MoonPack_ prefix, and DynamicStringConcat became MoonPack_DynamicStringConcat. The old key still works, which is why your workflow loads at all.

    The full details are on the MoonPack_DynamicStringConcat page. The short version: it's a string joiner whose input slots auto-expand as you plug in more connections - no more rebuilding a node because you need a fourth text input - plus a template mode where {1}, {2} placeholders interpolate instead of plain joining, with separator, prefix, suffix, whitespace stripping, and empty-skipping around the edges. One text output feeds your CLIP encoder.

    Why the legacy label is actually useful to know

    The rename story is the thing people trip on, so it's worth stating plainly: MoonPack v0.2 kept the old DynamicStringConcat key registered as an alias for exactly one release cycle, and the README says the aliases are scheduled for removal in 1.0. If your workflow still references the legacy key, the fix is one save: load it, hit save, and ComfyUI rewrites the graph using MoonPack_DynamicStringConcat. After that, a future pack update can't break the graph.

    Also worth knowing if you're comparing options: this node's main rival is kjnodes' Join String Multi, which shows up in community threads whenever someone asks about concatenating strings in ComfyUI. Both auto-expand; MoonPack's edge is the template interpolation mode. If MoonPack is already in your folder, that's one less pack to install.

    Installing it

    It comes with the pack, either way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/moonwhaler/comfyui-moonpack.git
    

    or ComfyUI Manager → MoonPack → install, restart. Under MoonPack/string. No models, no third-party Python dependencies - the pack is deliberately dependency-free beyond what ComfyUI ships.

    Bottom line

    The "(legacy)" is a naming artifact, not a warning that the node is obsolete. It works, it's the same node as the prefixed one, and the only action required of you is the one re-save that migrates your workflow to the new key.

    CategoryMoonPack/string

    Inputs (8)

    NameTypeDefaultDescription
    separatorSTRING Separator placed between joined strings (ignored when 'template' is non-empty).
    ignore_emptyBOOLEANtrueSkip inputs that are empty after stripping (join mode only).
    strip_whitespaceBOOLEANtrueStrip leading/trailing whitespace from each input before joining.
    newline_between_inputsBOOLEANfalseJoin inputs with a linefeed (\n) instead of 'separator' (join mode only).
    newline_wrapped_separatorSTRINGAdvanced. If non-empty, joins inputs as LF + this text + LF, e.g. '(input) LF (text) LF (input)'. Takes precedence over 'newline_between_inputs' and 'separator' (join mode only).
    prefixSTRINGPrepended to the final result.
    suffixSTRINGAppended to the final result.
    templateSTRINGIf non-empty, slots are interpolated into {N} placeholders instead of joined.

    Outputs (1)

    NameTypeDescription
    textSTRING