feat: add support for DEIS multistep scheduler
This commit is contained in:
parent
05756b2b08
commit
6b6f2f0eff
|
@ -18,6 +18,11 @@ from diffusers import (
|
||||||
PNDMScheduler,
|
PNDMScheduler,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
from diffusers import DEISMultistepScheduler
|
||||||
|
except:
|
||||||
|
from .stub_scheduler import StubScheduler as DEISMultistepScheduler
|
||||||
|
|
||||||
from ..params import DeviceParams, Size
|
from ..params import DeviceParams, Size
|
||||||
from ..utils import ServerContext, run_gc
|
from ..utils import ServerContext, run_gc
|
||||||
|
|
||||||
|
@ -29,6 +34,7 @@ latent_factor = 8
|
||||||
pipeline_schedulers = {
|
pipeline_schedulers = {
|
||||||
"ddim": DDIMScheduler,
|
"ddim": DDIMScheduler,
|
||||||
"ddpm": DDPMScheduler,
|
"ddpm": DDPMScheduler,
|
||||||
|
"deis-multi": DEISMultistepScheduler,
|
||||||
"dpm-multi": DPMSolverMultistepScheduler,
|
"dpm-multi": DPMSolverMultistepScheduler,
|
||||||
"dpm-single": DPMSolverSinglestepScheduler,
|
"dpm-single": DPMSolverSinglestepScheduler,
|
||||||
"euler": EulerDiscreteScheduler,
|
"euler": EulerDiscreteScheduler,
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
|
||||||
|
class StubScheduler():
|
||||||
|
def step(self, model_output: Any, timestep: int, sample: Any, return_dict: bool = True) -> None:
|
||||||
|
raise NotImplemented("scheduler not available, try updating diffusers")
|
|
@ -44,6 +44,7 @@ export const PLATFORM_LABELS: Record<string, string> = {
|
||||||
export const SCHEDULER_LABELS: Record<string, string> = {
|
export const SCHEDULER_LABELS: Record<string, string> = {
|
||||||
'ddim': 'DDIM',
|
'ddim': 'DDIM',
|
||||||
'ddpm': 'DDPM',
|
'ddpm': 'DDPM',
|
||||||
|
'deis-multi': 'DEIS Multistep',
|
||||||
'dpm-multi': 'DPM Multistep',
|
'dpm-multi': 'DPM Multistep',
|
||||||
'dpm-single': 'DPM Singlestep',
|
'dpm-single': 'DPM Singlestep',
|
||||||
'euler': 'Euler',
|
'euler': 'Euler',
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"CUDA",
|
"CUDA",
|
||||||
"ddim",
|
"ddim",
|
||||||
"ddpm",
|
"ddpm",
|
||||||
|
"deis",
|
||||||
"denoise",
|
"denoise",
|
||||||
"denoising",
|
"denoising",
|
||||||
"directml",
|
"directml",
|
||||||
|
|
Loading…
Reference in New Issue