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

Feature Request: Support the "correct" SDE variant of DPM-Solver++ #59

Closed
LuChengTHU opened this issue May 5, 2023 · 5 comments
Closed

Comments

@LuChengTHU
Copy link

Hi crowsonkb, recently I'm studying the SDE solvers and I find that the current implementation of "DPM++2M SDE" is not exactly the solver of the reverse diffusion SDE.

I've implemented the correct version of SDE-variant DPM++2M, and its performance is quite amazing in DeepFloyd-IF. Could you please check this PR in huggingface diffusers: huggingface/diffusers#3344 and implement it in your own repo? Thank you so much!

@LuChengTHU
Copy link
Author

Here are some examples with deepfloyd-if, where the stage-1 only uses 10 steps! (under the same random seed)

Stage-1: 10-step "sde-dpmsolver++" or "dpmsolver++" or DDPM.
Stage-2: 25-step "dpmsolver++".
Stage-3: 25-step "dpmsolver++".

I recommend using "sde-dpmsolver++" in stage-1, and "dpmsolver++" in stage-2 and stage-3.

My implemented "sde-dpmsolver++":

2_sde-dpm++_10
3_sde-dpm++_10

Official DDPM:

2_ddpm_10
3_ddpm_10

The DPMSolverSDEScheduler which reproduces your implemented "DPM++2M SDE":

2_k-sde_10
3_k-sde_10

@crowsonkb
Copy link
Owner

Oh that's interesting, the reverse diffusion SDE does better than ancestral sampling based solvers like mine for higher order SDE solvers? I need to look at this again, I had stopped trying anything reverse diffusion SDE based.

@crowsonkb
Copy link
Owner

Ohh, this one is a linear multistep solver! Mine was a single step solver. Here's a WIP gist: https://gist.github.com/crowsonkb/3ed16fba35c73ece7cf4b9a2095f2b78

@LuChengTHU
Copy link
Author

Amazing that you implement it so fast! So in you own experience, does this solver outperform the previous single step SDE solver?

@crowsonkb
Copy link
Owner

962d62b :)

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