From fe437e8cd40f166a17e1dc19f60aa47ffc0ccf49 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Thu, 9 Mar 2023 08:00:59 -0600 Subject: [PATCH] feat: add support for UniPC multistep scheduler (#226) --- api/onnx_web/diffusers/load.py | 6 ++++++ gui/src/strings/en.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/api/onnx_web/diffusers/load.py b/api/onnx_web/diffusers/load.py index 232a84d3..582edbdb 100644 --- a/api/onnx_web/diffusers/load.py +++ b/api/onnx_web/diffusers/load.py @@ -30,6 +30,11 @@ try: except ImportError: from ..diffusers.stub_scheduler import StubScheduler as DEISMultistepScheduler +try: + from diffusers import UniPCMultistepScheduler +except ImportError: + from ..diffusers.stub_scheduler import StubScheduler as UniPCMultistepScheduler + from ..params import DeviceParams, Size from ..server import ServerContext from ..utils import run_gc @@ -54,6 +59,7 @@ pipeline_schedulers = { "karras-ve": KarrasVeScheduler, "lms-discrete": LMSDiscreteScheduler, "pndm": PNDMScheduler, + "unipc-multi": UniPCMultistepScheduler, } diff --git a/gui/src/strings/en.ts b/gui/src/strings/en.ts index 07dc24ff..16c0d1c6 100644 --- a/gui/src/strings/en.ts +++ b/gui/src/strings/en.ts @@ -198,6 +198,7 @@ export const I18N_STRINGS_EN = { 'ipndm': 'iPNDM', 'lms-discrete': 'LMS', 'pndm': 'PNDM', + 'unipc-multi': 'UniPC Multistep', }, tab: { blend: 'Blend',