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] Negative prompt with batch size 2+ #44

Closed
Miczu opened this issue Sep 6, 2023 · 4 comments
Closed

[Bug] Negative prompt with batch size 2+ #44

Miczu opened this issue Sep 6, 2023 · 4 comments

Comments

@Miczu
Copy link
Contributor

Miczu commented Sep 6, 2023

So I started by disabling all extensions and I was able to narrow this bug specifically to sd-webui-neutral-prompt.
I disabled all non-native extensions and left sd-webui-neutral-prompt and I was still able to reproduce this issue.

Setup:
Prompt: 1girl
Negative: gloomy
Batch size: 2
Seed: 1

Step 1: generate, this will be reference two images
Step 2: modify Negative to "gloomy, vibrant"
Step 3: generate, you should already notice something weird with image 2
Step 4: modify Negative back to "gloomy"
Step 5: generate - at this point image 2 should look weird and not match reference image from step 1.

This corruption can be fixed by modifying in any way positive prompt (needs to differ on generate), even comma will do.

It feels like some caching issue as detecting change on Positive fixes it, but negative part isn't forcing refresh in the overall prompt.

@ljleb
Copy link
Owner

ljleb commented Sep 6, 2023

Thanks for the detailed steps, I narrowed down the issue.

When you change the negative prompt, for some reason the webui uses the positive prompt function, which the extension hijacks to display the right number of tokens for the positive prompt. I'll make a PR for the webui if I find an opportunity in the code, and otherwise I'll see if there's anything I can do from the extension.

@Miczu
Copy link
Contributor Author

Miczu commented Sep 6, 2023

Glad to hear the issue is reproducible and not just something on my end.
Neutral prompt provides really cool and unique features, so looking forward to a resolution.
I very appreciate your quick response and details on your findings!

@ljleb
Copy link
Owner

ljleb commented Sep 6, 2023

I submitted a PR to the webui as the issue originates from there. I'm not sure how long this could take.

For now, a workaround is to disable conds caching in the settings.

@ljleb
Copy link
Owner

ljleb commented Dec 6, 2023

Since webui==1.7.0-RC, this is fixed without needing to use the above workaround.

@ljleb ljleb closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants