-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Schedulers] Add exponential sigmas / exponential noise schedule #9499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Co-authored-by: YiYi Xu <[email protected]>
need a |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
thanks for the PR! this is cool and feel free to add to other schedulers! |
…gingface#9499) * exponential sigmas * Apply suggestions from code review Co-authored-by: YiYi Xu <[email protected]> * make style --------- Co-authored-by: YiYi Xu <[email protected]>
* exponential sigmas * Apply suggestions from code review Co-authored-by: YiYi Xu <[email protected]> * make style --------- Co-authored-by: YiYi Xu <[email protected]>
What does this PR do?
This PR adds exponential sigmas. Added only to Euler for now, after initial review we will add it to other schedulers, and add the other schedulers in the linked issue in subsequent PRs.
The implementation is quite simple, we add
use_exponential_sigmas
parameter and_convert_to_exponential
function.Example usage:
Note that we set
timestep_spacing="linspace"
in addition touse_exponential_sigmas=True
, this is because XL's scheduler config usestimestep_spacing="leading"
by default and the intent is to match results from the webuis where these noise schedules are currently used. We may wish to overridetimestep_spacing
tolinspace
whenuse_exponential_sigmas=True
or add a warning.Tested against Forge (note that
cuda
device for generator is essential to match Forge results):and with the same settings on Forge we get the same result:
![00002-49136503742430](https://private-user-images.githubusercontent.com/106811348/369925504-b8f19dab-cf76-4e5c-ac62-8eef46e1f1dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzAxODgsIm5iZiI6MTczOTY2OTg4OCwicGF0aCI6Ii8xMDY4MTEzNDgvMzY5OTI1NTA0LWI4ZjE5ZGFiLWNmNzYtNGU1Yy1hYzYyLThlZWY0NmUxZjFkZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQwMTM4MDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZmE2MjQwYzA5YTc2NDY5NDMyMTU3MGY1OTllMDRiNTQ1NDE0NzZjNzhkODJhOGU1ZDA5NThhYjM4NzE0ZDRmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.kQQLKc6CtAjB5PV0tXnlhOyr157UE2vuWjb1IHE1M0k)
For reference with the default XL scheduler in Diffusers we get:
![output2](https://private-user-images.githubusercontent.com/106811348/369926553-59844dff-246c-40fa-bf3c-4305600546bc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2NzAxODgsIm5iZiI6MTczOTY2OTg4OCwicGF0aCI6Ii8xMDY4MTEzNDgvMzY5OTI2NTUzLTU5ODQ0ZGZmLTI0NmMtNDBmYS1iZjNjLTQzMDU2MDA1NDZiYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxNlQwMTM4MDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xNDdlZjQzMjcxY2IzYzJhMzY5OGQ4NTNjZDY2MzJjOGY4MTQ0ZjhhYTE3ZjZkZTIyYTY0ZTBmNjBkZjBiNmFhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.cZUi7cXCW8vJb5aGd8gokVyMqoBREyUGtRosnyKRX5I)
#9490
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
cc @asomoza @yiyixuxu