Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: prompt parser doesn't allow whitespace between number and "]" in prompt editing #11627

Closed
1 task done
rubberbaron opened this issue Jul 5, 2023 · 1 comment
Closed
1 task done
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@rubberbaron
Copy link

rubberbaron commented Jul 5, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

The syntax [foo : 0.1] works correctly, but the syntax [foo : 0.1 ] doesn't work correctly.

For example, compare prompts "woman [on beach:0.5]" to "woman [on beach:0.5 ]" with a fixed seed.

The issue is this line of lark grammar: https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/master/modules/prompt_parser.py#L20

   scheduled: "[" [prompt ":"] prompt ":" [WHITESPACE] NUMBER "]"

which should be

   scheduled: "[" [prompt ":"] prompt ":" [WHITESPACE] NUMBER [WHITESPACE] "]"

Corresponding changes must be made to the two scheduled() visitors to account for the extra list item generated by the rule.

Steps to reproduce the problem

x

What should have happened?

x

Version or Commit where the problem happens

394ffa7

What Python version are you running on ?

None

What platforms do you use to access the UI ?

No response

What device are you running WebUI on?

No response

Cross attention optimization

xformers

What browsers do you use to access the UI ?

No response

Command Line Arguments

x

List of extensions

x

Console logs

x

Additional information

No response

@rubberbaron
Copy link
Author

Fixed by #12177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant