ComfyUI
ComfyUI copied to clipboard
Multiline Input automatically parse {}
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?
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 {}
Turn off dynamicPrompts like this
"wildcard": ("STRING", {"multiline": True, "dynamicPrompts": False}),