comfyui-dynamicprompts icon indicating copy to clipboard operation
comfyui-dynamicprompts copied to clipboard

Showstopping bug in Jinja2 Templates

Open ansorre opened this issue 1 year ago • 2 comments

Privided that I have colors.txt correctly filled with colors and saved in the right directory (wildcards under ComfyUI), if I add a Random Prompts node with the text "a colors cat" everything works well!

But if I add a Jinja2 Templates node with this text:

{% set color1=wildcard("colors")|random %} a {{color1}} cat

I get the warning (which in reality is an error): WARNING:dynamicprompts.samplers.utils:No values found for wildcard colors And the prompt remains: a colors cat

Not even a workaround passing this string to a Random Prompts is possibile because "Convert text to input" is missing in Random Prompts node. Someone has an idea about how to solve these problems?

ansorre avatar Sep 06 '23 16:09 ansorre