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

Dynamic prompts no longer working, need help parsing error message #777

Closed Don-Schlaich closed 1 month ago

Don-Schlaich commented 1 month ago
*** Error running process: E:\Stability Matrix\Packages\Stable Diffusion WebUI\extensions\sd-dynamic-prompts\scripts\dynamic_prompting.py
    Traceback (most recent call last):
      File "E:\Stability Matrix\Packages\Stable Diffusion WebUI\modules\scripts.py", line 825, in process
        script.process(p, *script_args)
      File "E:\Stability Matrix\Packages\Stable Diffusion WebUI\extensions\sd-dynamic-prompts\sd_dynamic_prompts\dynamic_prompting.py", line 480, in process
        all_prompts, all_negative_prompts = generate_prompts(
      File "E:\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 "E:\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 "E:\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 "E:\Stability Matrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\dynamicprompts\parser\parse.py", line 557, in parse
        tokens = get_cached_parser(parser_config).parse_string(
      File "E:\Stability Matrix\Packages\Stable Diffusion WebUI\venv\lib\site-packages\pyparsing\core.py", line 1200, in parse_string
        raise exc.with_traceback(None)
    pyparsing.exceptions.ParseException: Expected end of text, found '_'  (at char 225), (line:3, col:22)

Don't know what broke, but it's just skipping parsing the wildcards.

odie5533 commented 1 month ago

I got this issue as well. How'd you fix it?

Don-Schlaich commented 1 month ago

It was a problem in my prompt with one of my lora's. The default name had two underscores in it, so I had to dig a little deeper, change the option in Extra Networks>When adding to prompt, refer to Lora by to filename and rename the Lora.

Double-check your prompt for an issue like that.