-
Notifications
You must be signed in to change notification settings - Fork 6k
[2064]: Add Karras to DPMSolverMultistepScheduler #3001
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
Conversation
The documentation is not available anymore as the PR was closed or merged. |
@patrickvonplaten @sayakpaul Would love to get your review and thoughts related to #2064. 🙏 |
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.
Hey @nipunjindal! Thanks a lot for adding in this one.
Maybe, let's also add a test?
Also, could you elaborate the second part of ^ a bit? |
Certainly. In response to this message, I believe that we need to introduce a new scheduler in diffusers that currently does not exist. I have previously mentioned this in my earlier message. I would like to confirm that you are in agreement with this proposal. |
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.
Looks good to me - let's maybe just make sure that the copy-from mechanism works correctly
Co-authored-by: Patrick von Platen <[email protected]>
@@ -171,7 +171,6 @@ def __init__( | |||
self.model_outputs = [None] * solver_order | |||
self.lower_order_nums = 0 | |||
|
|||
# Copied from diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler.set_timesteps |
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.
Because it's no longer the same (as we added use_karras_sigmas
). So, in a separate PR, we can add support for Karras sigmans to this scheduler too.
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.
Makes sense!
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.
Good to go for me once the tests are green :-)
@@ -171,7 +171,6 @@ def __init__( | |||
self.model_outputs = [None] * solver_order | |||
self.lower_order_nums = 0 | |||
|
|||
# Copied from diffusers.schedulers.scheduling_dpmsolver_multistep.DPMSolverMultistepScheduler.set_timesteps |
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.
Makes sense!
Sorry for being late to add the |
It's no problem really. I was going to ping you. I hope it's fine I went into the PR a bit to make it fully ready to 🚀 We'd love to include this in the release we're planning. |
@nipunjindal the test is failing:
Possible for you to take a look? |
@sayakpaul Yes, I'll take a look and revert back. |
There seems to be an issue on the GitHub side as I'm unable to push or pull. Running
|
Co-authored-by: njindal <[email protected]>
Sorry, I think I probably messed up with the co-authorship. Apologies. |
These look unrelated error:
|
I think that is unrelated and okay to merge :) |
* [2737]: Add Karras DPMSolverMultistepScheduler * [2737]: Add Karras DPMSolverMultistepScheduler * Add test * Apply suggestions from code review Co-authored-by: Patrick von Platen <[email protected]> * fix: repo consistency. * remove Copied from statement from the set_timestep method. * fix: test * Empty commit. Co-authored-by: njindal <[email protected]> --------- Co-authored-by: njindal <[email protected]> Co-authored-by: Patrick von Platen <[email protected]> Co-authored-by: Sayak Paul <[email protected]>
* [2737]: Add Karras DPMSolverMultistepScheduler * [2737]: Add Karras DPMSolverMultistepScheduler * Add test * Apply suggestions from code review Co-authored-by: Patrick von Platen <[email protected]> * fix: repo consistency. * remove Copied from statement from the set_timestep method. * fix: test * Empty commit. Co-authored-by: njindal <[email protected]> --------- Co-authored-by: njindal <[email protected]> Co-authored-by: Patrick von Platen <[email protected]> Co-authored-by: Sayak Paul <[email protected]>
* [2737]: Add Karras DPMSolverMultistepScheduler * [2737]: Add Karras DPMSolverMultistepScheduler * Add test * Apply suggestions from code review Co-authored-by: Patrick von Platen <[email protected]> * fix: repo consistency. * remove Copied from statement from the set_timestep method. * fix: test * Empty commit. Co-authored-by: njindal <[email protected]> --------- Co-authored-by: njindal <[email protected]> Co-authored-by: Patrick von Platen <[email protected]> Co-authored-by: Sayak Paul <[email protected]>
* [2737]: Add Karras DPMSolverMultistepScheduler * [2737]: Add Karras DPMSolverMultistepScheduler * Add test * Apply suggestions from code review Co-authored-by: Patrick von Platen <[email protected]> * fix: repo consistency. * remove Copied from statement from the set_timestep method. * fix: test * Empty commit. Co-authored-by: njindal <[email protected]> --------- Co-authored-by: njindal <[email protected]> Co-authored-by: Patrick von Platen <[email protected]> Co-authored-by: Sayak Paul <[email protected]>
Discussion: #2064
Adding karras sigmas schedule to DPMSolverMultistepScheduler based on PR.
As I mentioned earlier in #2064, the sample_dpmp_sde is not equivalent to DPM Multistep + karras which is something I confirmed after running the test. There is another bug in the kdiffusion code where
BrownianTreeNoiseSampler
is not being passed the seed, so the run forsample_dpmp_sde
gives back different results each time, fixed after giving the seed though.I believe we can still merge this PR as it's needed but the #2064 needs a new scheduler.
Let me know your thoughts.
DPM Multistep + Karras Sigma