-
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
[Cont'd
] Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single Step
#8269
[Cont'd
] Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single Step
#8269
Conversation
Co-authored-by: cmdr2 <[email protected]>
Cont
] Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single StepCont'd
] Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single Step
…ype` check in DPMSolverSinglestepScheduler class
This reverts commit 4123c86.
Thanks for this nice PR! For single-step method we indeed should use |
Thank you very much for your review! |
!git clone -b sde-dpmsolver-single-step https://github.com/tolgacangoz/diffusers.git
%cd diffusers
!pip install -e . accelerate -q
from diffusers import AutoPipelineForText2Image, DPMSolverSinglestepScheduler
import torch
pipeline_text2image = AutoPipelineForText2Image.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16",
use_safetensors=True).to("cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
generator = torch.Generator('cpu').manual_seed(0)
pipeline_text2image.scheduler = DPMSolverSinglestepScheduler.from_config(
pipeline_text2image.scheduler.config, algorithm_type='sde-dpmsolver',
final_sigmas_type='sigma_min')
image = pipeline_text2image(prompt=prompt, generator=generator).images[0]
image
|
For
Even multi-step with |
Hi @tolgacangoz , I would suggest only use sde-dpmsolver++ because this formulation is more suitable for SDEs and can include stochastic DDIM / DDPM as the first order case. For sde-dpmsolver it may even need 1000 steps to converge so it is hard to use in practice. |
OK, thank you for your feedback! |
@LuChengTHU is this PR good to merge now? |
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. |
…ffusers into sde-dpmsolver-single-step
…om algorithm_type loop
Cont'd
] Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single StepCont'd
] Add the SDE variant of ~~DPM-Solver~~ and DPM-Solver++ to DPM Single Step
@tolgacangoz |
Thanks for merging and labeling as a good PR! |
…DPM Single Step (huggingface#8269) * Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single Step --------- Co-authored-by: cmdr2 <[email protected]>
Cont'd
] Add the SDE variant of ~~DPM-Solver~~ and DPM-Solver++ to DPM Single StepCont'd
] Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single Step
…DPM Single Step (#8269) * Add the SDE variant of DPM-Solver and DPM-Solver++ to DPM Single Step --------- Co-authored-by: cmdr2 <[email protected]>
Thanks for the opportunity to continue #4251 @yiyixuxu.
There was uncertainty about whether
sigma_s0
orsigma_s1
should be used in the second-order update insde-dpmsolver++
when @cmdr2 was implementing. I tried both and chosesigma_s1
:sigma_s0
sigma_s1
Reproduction notebook.
@LuChengTHU I want to congratulate you on this invention and thank you for your previous DPM-Solver contributions in the repo. It would be very nice to review this version. This PR is the exact copy of your "Add the SDE variant of DPM-Solver and DPM-Solver++ [for multi-step]" #3344 PR except
sigma_s1
is used in the second-order update rather thansigma_s0
.