-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Fix prompt parser default step transformer #6628
Fix prompt parser default step transformer #6628
Conversation
This looks like a very uncommon case. Just add the fix, without settings, and we will document this. |
Removed the compat option from settings now. |
|
I believe this breaks the |
Full sample prompt? If I test for |
At least with Anything v3, I tried (DPM++ 2M Karras, 30 sampling steps, 512x512):
If I'll attach an example in a few minutes once my current task is over. |
Running a test on that prompt via doctest doesn't cut the rest off, so it parses it correctly. I also get different results in the webui with and without the rest after |
Here are the tests: Prompt 1:
Prompt 2:
Result: Common negative prompt (for both):
Parameters: 30 sampling steps, 12 CFG scale, model Anything v3, sampler DPM++ 2M Karras, 512x512, seed 1699627363. |
Well for prompt 1 it's basically identical to your's. For prompt 2 it's actually working fine for me. Image & PNG Info
|
Weird indeed. I'll go through the list of the extensions, perhaps there's something interfering there. |
Describe what this pull request is trying to achieve.
This PR aims to fix the prompt parser's default step transformer as part of processing the prompt AST. In particular, the current implementation causes a case where if emphasis is used in the alternating words syntax, it incorrectly parses the prompt. Ultimately, I believe this is a very simple fix.
This is an output from doctest in the current implementation for this case:
After implementing this PR, the test passes, and all other existing tests pass (besides the one explicitly labeled
not handling this right now
).Additional notes and description of your changes
I've included a compatibility option incase users (like myself) had previously used this syntax and still want to replicate old seeds. If you believe this is unnecessary feel free to remove it.
Environment this was tested in