1
0
Fork 0

feat: add support for DEIS multistep scheduler

This commit is contained in:
Sean Sube 2023-02-13 22:37:54 -06:00
parent 05756b2b08
commit 6b6f2f0eff
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 14 additions and 0 deletions

View File

@ -18,6 +18,11 @@ from diffusers import (
PNDMScheduler,
)
try:
from diffusers import DEISMultistepScheduler
except:
from .stub_scheduler import StubScheduler as DEISMultistepScheduler
from ..params import DeviceParams, Size
from ..utils import ServerContext, run_gc
@ -29,6 +34,7 @@ latent_factor = 8
pipeline_schedulers = {
"ddim": DDIMScheduler,
"ddpm": DDPMScheduler,
"deis-multi": DEISMultistepScheduler,
"dpm-multi": DPMSolverMultistepScheduler,
"dpm-single": DPMSolverSinglestepScheduler,
"euler": EulerDiscreteScheduler,

View File

@ -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")

View File

@ -44,6 +44,7 @@ export const PLATFORM_LABELS: Record<string, string> = {
export const SCHEDULER_LABELS: Record<string, string> = {
'ddim': 'DDIM',
'ddpm': 'DDPM',
'deis-multi': 'DEIS Multistep',
'dpm-multi': 'DPM Multistep',
'dpm-single': 'DPM Singlestep',
'euler': 'Euler',

View File

@ -22,6 +22,7 @@
"CUDA",
"ddim",
"ddpm",
"deis",
"denoise",
"denoising",
"directml",