2023-05-11 12:40:03 +00:00
|
|
|
from diffusers import (
|
|
|
|
DDIMScheduler,
|
2023-08-18 15:13:28 +00:00
|
|
|
DDPMScheduler,
|
|
|
|
DEISMultistepScheduler,
|
2023-05-11 12:40:03 +00:00
|
|
|
DPMSolverMultistepScheduler,
|
2023-08-18 15:13:28 +00:00
|
|
|
DPMSolverSDEScheduler,
|
|
|
|
DPMSolverSinglestepScheduler,
|
2023-05-11 12:40:03 +00:00
|
|
|
EulerAncestralDiscreteScheduler,
|
2023-08-18 15:13:28 +00:00
|
|
|
EulerDiscreteScheduler,
|
2023-05-11 14:23:33 +00:00
|
|
|
HeunDiscreteScheduler,
|
2023-08-18 15:13:28 +00:00
|
|
|
KDPM2AncestralDiscreteScheduler,
|
|
|
|
KDPM2DiscreteScheduler,
|
2023-05-11 14:23:33 +00:00
|
|
|
LMSDiscreteScheduler,
|
|
|
|
PNDMScheduler,
|
|
|
|
UniPCMultistepScheduler,
|
2023-07-27 14:54:01 +00:00
|
|
|
)
|
2023-05-11 12:40:03 +00:00
|
|
|
|
|
|
|
SCHEDULER_MAP = dict(
|
2023-05-11 14:23:33 +00:00
|
|
|
ddim=(DDIMScheduler, dict()),
|
2023-05-11 15:18:34 +00:00
|
|
|
ddpm=(DDPMScheduler, dict()),
|
2023-05-11 15:10:30 +00:00
|
|
|
deis=(DEISMultistepScheduler, dict()),
|
2023-06-17 18:00:16 +00:00
|
|
|
lms=(LMSDiscreteScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
lms_k=(LMSDiscreteScheduler, dict(use_karras_sigmas=True)),
|
2023-05-11 14:59:43 +00:00
|
|
|
pndm=(PNDMScheduler, dict()),
|
2023-05-12 14:43:32 +00:00
|
|
|
heun=(HeunDiscreteScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
heun_k=(HeunDiscreteScheduler, dict(use_karras_sigmas=True)),
|
2023-05-11 14:59:43 +00:00
|
|
|
euler=(EulerDiscreteScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
euler_k=(EulerDiscreteScheduler, dict(use_karras_sigmas=True)),
|
|
|
|
euler_a=(EulerAncestralDiscreteScheduler, dict()),
|
|
|
|
kdpm_2=(KDPM2DiscreteScheduler, dict()),
|
|
|
|
kdpm_2_a=(KDPM2AncestralDiscreteScheduler, dict()),
|
2023-06-17 18:00:16 +00:00
|
|
|
dpmpp_2s=(DPMSolverSinglestepScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
dpmpp_2s_k=(DPMSolverSinglestepScheduler, dict(use_karras_sigmas=True)),
|
2023-05-11 14:59:43 +00:00
|
|
|
dpmpp_2m=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
dpmpp_2m_k=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=True)),
|
2023-06-18 20:38:15 +00:00
|
|
|
dpmpp_2m_sde=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=False, algorithm_type="sde-dpmsolver++")),
|
|
|
|
dpmpp_2m_sde_k=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")),
|
|
|
|
dpmpp_sde=(DPMSolverSDEScheduler, dict(use_karras_sigmas=False, noise_sampler_seed=0)),
|
|
|
|
dpmpp_sde_k=(DPMSolverSDEScheduler, dict(use_karras_sigmas=True, noise_sampler_seed=0)),
|
2023-05-11 12:40:03 +00:00
|
|
|
unipc=(UniPCMultistepScheduler, dict(cpu_only=True)),
|
|
|
|
)
|