Nodes/WebDev9000-Nodes/Ignore Braces
ComfyUI Node

Ignore Braces

The Tiny Node That Stops ComfyUI From Eating Your Braces

By WebDev9000·Created 3 years ago·Updated 2 years ago· 1
Ignore Braces
    • text
    text

    You've got a LoRA whose filename has curly braces in it - something like style{0.8} or char_{v1} - and every time you paste the trigger into a prompt, ComfyUI mangles it. Weird chunks of your text vanish, the model does something you didn't ask for, or the prompt just comes out wrong. That's ComfyUI's dynamic-prompt parser running on text you never wanted parsed. IgnoreBraces is the 20-line fix.

    What it actually is

    IgnoreBraces is a string pass-through node. One text input, one text output, and nothing in between - literally, the source's FUNCTION is return (text,). The only thing it does is declare that its text should not be treated as a dynamic prompt. The name isn't describing what the node does to your string; it's describing what it tells ComfyUI not to do to it.

    That matters more than it sounds, because ComfyUI parses { } in prompt text by default. This is the same "bracket trick" you've seen in wildcard workflows: wrap alternatives in {this|that|the other} and each batch picks a different one, or drop in __wildcards__ for whole-file randomness. Great for variety, awful when your text legitimately contains a brace - and LoRA filenames are where that bites. Filenames with {0.7-0.8}-style weight markers get interpreted as alternation syntax instead of a literal filename.

    The author hit exactly this: they make the Extra Network Browser, a standalone LoRA browser that copies triggers from brace-y filenames straight into your prompt, and they needed a way to inject that text into ComfyUI without the parser chewing it up. IgnoreBraces is that way.

    How it works

    The mechanism is one flag. In the node's INPUT_TYPES, the multiline text widget is declared with "dynamicPrompts": False. That's the switch the ComfyUI frontend checks before it runs brace/wildcard expansion on a widget's contents - set it to false and the text sails through unparsed. Because it's marked as an output node, whatever comes through shows up in your results panel, which is a handy sanity check the first time you use it.

    The one input, the one output

    There's exactly one of each:

    • text (STRING, multiline) - the raw prompt text, braces included, no escaping needed.
    • text (STRING) out - same string, untouched. Wire it into any node that accepts prompt text, like CLIPTextEncode or a Prompt Control text input.

    That's the whole surface. If you don't have brace text, this node is a no-op and you don't need it.

    Installing it

    Two ways, both boring. Via ComfyUI Manager, search "WebDev9000-Nodes" and hit install. Or the manual route from the README:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WebDev9000/WebDev9000-Nodes
    

    Restart ComfyUI. There's no requirements.txt, no model downloads, no Python deps - the whole pack is two tiny pure-stdlib files, so this is about as safe an install as custom nodes get.

    Gotchas

    The honest limitation: this only silences ComfyUI's own dynamic-prompt layer. If the node you're feeding does its own brace parsing downstream, IgnoreBraces won't stop it. And don't expect it to fix generic prompt problems - if your issue isn't curly-brace parsing, this node does nothing for you, because it does nothing at all. It's a scalpel for one specific wound, and for that one wound it's exactly right.

    CategoryWebDev9000

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    textSTRING