adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation
MIT License
1.96k stars 253 forks source link

Conflict if using Loras with sd1.7, Dynamic Prompt stopped working #699

Closed OtakuFra closed 3 months ago

OtakuFra commented 6 months ago

As mentionned in the tittle, DP stopped working when its used with loras,didn't chek for SDXL but i guess it's the same.

error in the console log *** Error running process: D:\Stability-Matrix\Packages\Stable Diffusion WebUI\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py Traceback (most recent call last): File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\modules\scripts.py", line 718, in process script.process(p, *script_args) File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\extensions\sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 481, in process all_prompts, all_negative_prompts = generate_prompts( File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\extensions\sd-dynamic-prompts\sd_dynamic_prompts\helpers.py", line 93, in generate_prompts all_prompts = prompt_generator.generate(prompt, num_prompts, seeds=seeds) or [""] File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\dynamicprompts\generators\randomprompt.py", line 67, in generate gen = self._context.sample_prompts(template, num_images) File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\dynamicprompts\sampling_context.py", line 119, in sample_prompts command = parse(prompt, parser_config=self.parser_config) File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\dynamicprompts\parser\parse.py", line 454, in parse tokens = get_cached_parser(parser_config).parse_string( File "D:\Stability-Matrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\pyparsing\core.py", line 1197, in parse_string raise exc.with_traceback(None) pyparsing.exceptions.ParseException: Expected end of text, found '_' (at char 545), (line:1, col:546)

akx commented 6 months ago

What is your prompt? This probably has to do with a LoRA having two underscores in the name.