sd-dynamic-prompts
sd-dynamic-prompts copied to clipboard
$ in promt creates Error message
Issue: Parsing Error with $ in Tags in Dynamic Prompts
Description
When using a wildcard file containing references, I encountered a parsing error caused by $ characters in certain tags. Since $ is reserved in Dynamic Prompts for variable substitution, this results in a parsing error. For example,this issue arises when a LoRA creator includes a $ in the trigger tag, often to stylize a name (e.g., $tephanie instead of Stephanie). Since $ is reserved in Dynamic Prompts for variable substitution, this results in a parsing error.
Steps to Reproduce
- Use a wildcard file that includes references with
$in their tags. - Include
__your_wildcard__in a prompt. - Generate an image using Dynamic Prompts (preferrably using combinatorial, as this will always parse the line in question).
Expected Behavior
$in tags should either be escaped properly or ignored by the parser to prevent a crash.
Question
Is there currently a way to escape the $ character in tags? If not, could this be implemented in a future update?
Thanks for your great work on this extension! 😊
dang it! same problem, was hoping you can escape it but can't find a way to
That might be too late, but it can help others.
I had the same issue after reinstalling Forge, the problem seems to be an update of pyparsing
* Go into venv/scripts/ * Open a cmd and type `activate` (this will open the python command for your virtual environnement) * Type `pip show pyparsing` * Mine was showing 3.2.4 * Installing pyparsing 3.2.3 fixed the issue for me. `pip install pyparsing==3.2.3`
hey I had the same problem but I was on an older pyparsing version, updating didnt help do you know exactly what caused this? I know the parser cant comprehend $ in the regular prompt because of the variables