1
0
Fork 0
onnx-web/api/onnx_web/diffusers/version_safe_diffusers.py

37 lines
1.1 KiB
Python
Raw Normal View History

from diffusers import * # NOQA
try:
2023-04-15 19:42:14 +00:00
from diffusers import DEISMultistepScheduler
except ImportError:
2023-04-15 19:42:14 +00:00
from ..diffusers.stub_scheduler import StubScheduler as DEISMultistepScheduler
try:
from diffusers import DPMSolverSDEScheduler
2023-12-10 05:51:43 +00:00
except ImportError:
from ..diffusers.stub_scheduler import StubScheduler as DPMSolverSDEScheduler
2023-11-22 05:14:15 +00:00
try:
from diffusers import LCMScheduler
except ImportError:
from ..diffusers.stub_scheduler import StubScheduler as LCMScheduler
try:
2023-04-15 19:42:14 +00:00
from diffusers import UniPCMultistepScheduler
except ImportError:
2023-04-15 19:42:14 +00:00
from ..diffusers.stub_scheduler import StubScheduler as UniPCMultistepScheduler
try:
from diffusers.models.modeling_outputs import AutoencoderKLOutput
except ImportError:
from diffusers.models.autoencoder_kl import AutoencoderKLOutput
try:
from diffusers.models.autoencoders.vae import DecoderOutput
except ImportError:
from diffusers.models.vae import DecoderOutput
try:
2023-04-15 19:42:14 +00:00
from diffusers.models.attention_processor import AttnProcessor
except ImportError:
2023-04-15 19:42:14 +00:00
from diffusers.models.cross_attention import CrossAttnProcessor as AttnProcessor