ComfyUI Node

StringConcat

Joining up to four strings before they hit your prompt or template

By asagi4·Created 3 years ago·Updated about a month ago· 422
StringConcat
    • STRING
    string1
    string2
    string3
    string4

    The simplest node in the entire pack, and it doesn't need much explaining. StringConcat takes up to four optional string inputs and glues them together into one output string. No parsing, no scheduling, no Prompt Control syntax awareness at all - it's generic plumbing that happens to ship in this pack because the pack's other tools (JinjaRender, SimpleWildcard) frequently need exactly this kind of glue afterward.

    Where it actually earns its place

    Say you've resolved a wildcard with SimpleWildcard, or rendered a template with JinjaRender, and now you want to prepend a fixed prefix or append a fixed suffix before the result goes into PromptToSchedule or PCTextEncode. Rather than reaching for a general string-manipulation node from some other pack, or hand-editing a single combined text field every time the dynamic part changes, StringConcat lets you keep the fixed and dynamic pieces as separate graph inputs and join them at the last step.

    The inputs and output

    All four inputs are optional, and none of them are required - you can wire just one or two and leave the rest empty:

    • string1, string2, string3, string4 - all STRING, all defaulting to an empty string.

    Output: a single STRING, the four pieces concatenated in order.

    There's no separator field anywhere in the schema. With a name like StringConcat and no delimiter input, expect a straight, no-frills concatenation - if you want a space or a comma between two pieces, put it at the end of the earlier one yourself rather than counting on the node to insert anything between them.

    How to install it

    You don't install this node on its own - it comes with the pack.

    • ComfyUI Manager - search "ComfyUI Prompt Control", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/asagi4/comfyui-prompt-control, restart ComfyUI.

    Requires ComfyUI v0.8.0+, same as every other node in the pack, even one this small.

    Common issues & troubleshooting

    Your combined prompt has no spacing between pieces, or a run-together word. That's the no-separator behavior above, not a bug - go back and add a trailing space or comma to the piece feeding the earlier slot. It's an easy thing to trip over exactly once and then never forget.

    You only need to join two strings and feel like you're wasting two inputs. You're not - leave string3 and string4 empty, they default to blank and contribute nothing to the output. There's no requirement to fill all four, and there's no penalty for leaving slots unused.

    You need more than four pieces. Chain two StringConcat nodes - feed the output of one into a slot on a second - rather than looking for a fifth input that doesn't exist. It's not elegant, but it's the same trick you'd use with any fixed-arity concat node in any pack.

    You're reaching for this and wondering if there's something smarter available. For pure string-gluing, there usually isn't a good reason to look further - this is about as simple as a node gets, and that's the appeal. Save the more powerful tools (JinjaRender for real templating logic) for when you actually need loops or conditionals, not for basic concatenation.

    Categorypromptcontrol/tools

    Inputs (4)

    NameTypeDefaultDescription
    string1optSTRING
    string2optSTRING
    string3optSTRING
    string4optSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING