2023-05-11 12:40:03 +00:00
|
|
|
from diffusers import DDIMScheduler, DPMSolverMultistepScheduler, KDPM2DiscreteScheduler, \
|
|
|
|
KDPM2AncestralDiscreteScheduler, EulerDiscreteScheduler, EulerAncestralDiscreteScheduler, \
|
2023-05-11 14:23:33 +00:00
|
|
|
HeunDiscreteScheduler, LMSDiscreteScheduler, PNDMScheduler, UniPCMultistepScheduler, \
|
|
|
|
DPMSolverSinglestepScheduler
|
2023-05-11 12:40:03 +00:00
|
|
|
|
|
|
|
SCHEDULER_MAP = dict(
|
2023-05-11 14:23:33 +00:00
|
|
|
ddim=(DDIMScheduler, dict()),
|
|
|
|
k_lms=(LMSDiscreteScheduler, dict()),
|
|
|
|
plms=(PNDMScheduler, dict()),
|
|
|
|
k_euler=(EulerDiscreteScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
euler_karras=(EulerDiscreteScheduler, dict(use_karras_sigmas=True)),
|
|
|
|
k_euler_a=(EulerAncestralDiscreteScheduler, dict()),
|
|
|
|
k_dpm_2=(KDPM2DiscreteScheduler, dict()),
|
|
|
|
k_dpm_2_a=(KDPM2AncestralDiscreteScheduler, dict()),
|
|
|
|
dpmpp_2s=(DPMSolverSinglestepScheduler, dict()),
|
|
|
|
k_dpmpp_2=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=False)),
|
|
|
|
k_dpmpp_2_karras=(DPMSolverMultistepScheduler, dict(use_karras_sigmas=True)),
|
|
|
|
k_heun=(HeunDiscreteScheduler, dict()),
|
2023-05-11 12:40:03 +00:00
|
|
|
unipc=(UniPCMultistepScheduler, dict(cpu_only=True))
|
|
|
|
)
|