-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Fix DPM++ SDE not deterministic across different batch sizes (#5210) #7730
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 DPM++ SDE not deterministic across different batch sizes (#5210) #7730
Conversation
Thanks for this, been waiting for a long time :) |
Works well! Tested various start seeds and diff batch sizes, all reproducable. |
I'm seeing an assert with Batch Count above 1. No issue with Batch Size, |
Confirmed the assert is now fixed with this new commit. Tested various batch count, batch size, batch count + batch size in txt2img & img2img and all were deterministic and with reproducible seeds using SDE samplers. I also briefly stress tested with Batch count + Batch size + Extra Variation Seed + HiresFix + DynamicThreshold Plugin all used at the same time with DPM++SDE Karras, and that as well appeared to be working with reproducible seeds. Good job. |
Is this really fixed in the live version? I still cant replicate the single seed versus batch when using SDE sampler, and k-diffusers is enabled in settings. |
Yes, it's been active in webui since it got merged 2 weeks ago. I just re-confirmed it is working on the latest GIT.
If it wasn't already obvious, this change only helps you reproduce seeds for SDE batches created after this commit was merged, as well any new or old SDE single image (no batch) seeds no matter the batch size or starting seed used with the fix. If you are only seeing small variations yet the overall image structure remains unchanged when attempting to reproduce seeds, those changes are being caused by xformers. Disable xformers if you need perfect seed reproducibility (this applies to any sampler). To reproduce older SDE batch seeds, you'd still need to use exactly the same batch size and disable this fix in settings. This fix doesn't help at all with old SDE batch seed reproduction. |
Perfect, I had it checked mistakenly. Thanks! |
I have now encountered this same issue with Euler A. The resulting images are similar but not quite the same. |
Describe what this pull request is trying to achieve.
Fix #5210.
Additional notes and description of your changes
An option was added to ensure reproducibility of old seeds.
Environment this was tested in
List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.