ComfyUI Node

NonDynamic String

A string box that refuses to randomize

By DigitalIO·Created 3 years ago·Updated 11 months ago· 35
NonDynamic String
    • String
    string

    Most ComfyUI nodes do more than they advertise. This one does less. NonDynamic String is a bare STRING passthrough whose only job is to not expand wildcards - and for a specific corner of ComfyUI, that's genuinely useful.

    What it is

    It ships in the same ComfyUI-stable-wildcards pack as Stable Wildcards, and the README calls it the "bonus node." Where Stable Wildcards deliberately expands {a|b} with a seeded random generator, NonDynamic String deliberately does nothing: you type a string, it hands it back unchanged.

    The reason it exists is ComfyUI's built-in dynamic prompts. Any multiline string box in core nodes treats {a|b} and [from:to:when] syntax as a randomization trigger and swaps in a random pick on every run. That's great for prompt variety and a nightmare when you have literal braces in a string you're feeding somewhere that must stay fixed - a filename, an API payload, a context note, or a seed-chasing debug graph where the last thing you need is hidden randomness.

    How it works

    There's no logic to reverse-engineer. The node's string widget is created with dynamicPrompts: False, which tells ComfyUI to leave the text alone, and execute() returns the input untouched. That flag is the entire feature - and because it's set at the widget level, the string stays inert no matter where the output gets wired.

    The one input, the one output

    • string - multiline STRING, default empty. Whatever you type here.
    • Output String - the same text, verbatim.

    That's the whole interface. If you need to expand wildcards, this is the wrong node - that's Stable Wildcards, or ComfyUI's default behavior. If you need a string that doesn't get second-guessed by the randomizer, this is exactly it.

    Installing it

    It comes bundled with the pack, so installing either node installs both. ComfyUI Manager, search "ComfyUI-stable-wildcards":

    cd ComfyUI/custom_nodes
    git clone https://github.com/DigitalIO/ComfyUI-stable-wildcards
    

    Then restart ComfyUI. Zero dependencies, zero models, zero setup beyond the clone.

    When you'd actually reach for it

    Honest take: this is a niche helper, not a daily driver. Its natural habitat is a workflow where a downstream node or a saved workflow string contains literal { | } characters that you don't want interpreted - or where you're hand-feeding pre-expanded prompts and want to guarantee they travel through the graph untouched. If braces have ever quietly expanded in a place you didn't expect, you've met the problem it solves. If not, you may never need it - but it's free, it's a single widget, and it's a clean way to make your intent explicit in a graph that otherwise randomizes everything.

    CategoryStableWildcards

    Inputs (1)

    NameTypeDefaultDescription
    stringSTRING

    Outputs (1)

    NameTypeDescription
    StringSTRING