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

Is there a diffuser version? #9

Closed
dingjingzhen opened this issue Nov 1, 2022 · 7 comments
Closed

Is there a diffuser version? #9

dingjingzhen opened this issue Nov 1, 2022 · 7 comments

Comments

@dingjingzhen
Copy link

Is there a diffuser version?

@LuChengTHU
Copy link
Owner

We did not support the diffusers yet. However, I guess it is easy to combine DPM-Solver with diffusers. For example, applying DPM-Solver for stable-diffusion only needs to add this file: /~https://github.com/LuChengTHU/dpm-solver/tree/main/example_v2/stable-diffusion/ldm/models/diffusion/dpm_solver

@keturn
Copy link

keturn commented Nov 1, 2022

The catch with 🧨diffusers is that their pipelines are written to sample things according to this Scheduler interface, and that's an interface that doesn't work well with higher-order samplers like these that need to do multiple model evaluations in a single step.

I hope we'll get diffusers to replace this with a better-suited API, but in the meantime it's possible to make yourself a pipeline that passes the model to the dpm-solver sampler. There's one such attempt to do that here: huggingface/diffusers#857 — it needs some help but it has the potential to let you run the implementations of dpm-solver that are in k-diffusion against a diffusers model.

@dingjingzhen
Copy link
Author

We did not support the diffusers yet. However, I guess it is easy to combine DPM-Solver with diffusers. For example, applying DPM-Solver for stable-diffusion only needs to add this file: /~https://github.com/LuChengTHU/dpm-solver/tree/main/example_v2/stable-diffusion/ldm/models/diffusion/dpm_solver

Very good work, I will try to use it on diffusers for better use

@LuChengTHU
Copy link
Owner

@dingjingzhen I also created a PR for stable-diffusion, and you can see the detailed modification here: CompVis/stable-diffusion#440

@LuChengTHU
Copy link
Owner

The catch with 🧨diffusers is that their pipelines are written to sample things according to this Scheduler interface, and that's an interface that doesn't work well with higher-order samplers like these that need to do multiple model evaluations in a single step.

I hope we'll get diffusers to replace this with a better-suited API, but in the meantime it's possible to make yourself a pipeline that passes the model to the dpm-solver sampler. There's one such attempt to do that here: huggingface/diffusers#857 — it needs some help but it has the potential to let you run the implementations of dpm-solver that are in k-diffusion against a diffusers model.

Thanks for the help. I will try it.

@LuChengTHU
Copy link
Owner

LuChengTHU commented Nov 4, 2022

Hi @keturn @dingjingzhen, I've created a pull request for diffusers that supports the multistep version DPM-Solver: huggingface/diffusers#1132

I hope it will be merged soon :)

@LuChengTHU
Copy link
Owner

Hi @keturn @dingjingzhen, I've created a pull request for diffusers that supports the multistep version DPM-Solver: huggingface/diffusers#1132

I hope it will be merged soon :)

Thanks to the great efforts of the huggingface team, DPM-Solver has been supported in diffusers! Close this issue now.

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

3 participants