Make diffusers importable with transformers < 4.26 (#2380)
This commit is contained in:
parent
90a624f697
commit
a60f5555f5
|
@ -64,7 +64,10 @@ try:
|
|||
if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.26.0")):
|
||||
raise OptionalDependencyNotAvailable()
|
||||
except OptionalDependencyNotAvailable:
|
||||
from ...utils.dummy_torch_and_transformers_objects import StableDiffusionDepth2ImgPipeline
|
||||
from ...utils.dummy_torch_and_transformers_objects import (
|
||||
StableDiffusionDepth2ImgPipeline,
|
||||
StableDiffusionPix2PixZeroPipeline,
|
||||
)
|
||||
else:
|
||||
from .pipeline_stable_diffusion_depth2img import StableDiffusionDepth2ImgPipeline
|
||||
from .pipeline_stable_diffusion_pix2pix_zero import StableDiffusionPix2PixZeroPipeline
|
||||
|
|
Loading…
Reference in New Issue