ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Multiline Input automatically parse {}

Open ac-pill opened this issue 1 year ago • 2 comments

Hi, I'm testing some custom nodes that require formatting multiline string parsing over stacking.

When I input on a single line line input widget something like: Hello {} ! The output remains Hello {} !

But if I input Hello {} ! on a multiline widget the output will be always: Hello !

Is there a why and a way to prevent this programmatically on my custom node, on the input class?

ac-pill avatar Apr 04 '24 16:04 ac-pill

That sounds like the nodes are printing the output with the python format modifier on the string but no variable.
Some nodes parse strings as expressions that can contain math and other formatting so that's another possibility, you'd need to look at their documentation. I think in prompt textboxes you usually use {} to enclose a series of text fragments to randomly choose from like "in {summer|winter|spring|fall}" so that might be doing it. Try writing it out as '{}' and see if it still disappears, or maybe {}

NeedsMoar avatar Apr 07 '24 14:04 NeedsMoar

Turn off dynamicPrompts like this

"wildcard": ("STRING", {"multiline": True, "dynamicPrompts": False}),

ltdrdata avatar Apr 07 '24 15:04 ltdrdata