"docs/vscode:/vscode.git/clone" did not exist on "bc82ffe2b468d1966d5088ef40256cf58cfdf41b"
Unverified Commit a60f5555 authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Make diffusers importable with transformers < 4.26 (#2380)

parent 90a624f6
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment