Unverified Commit 008c22d3 authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

Improve transformers versions handling (#2104)

parent b562b661
...@@ -57,7 +57,7 @@ else: ...@@ -57,7 +57,7 @@ else:
try: try:
if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.26.0.dev0")): if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.26.0")):
raise OptionalDependencyNotAvailable() raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable: except OptionalDependencyNotAvailable:
from ...utils.dummy_torch_and_transformers_objects import StableDiffusionDepth2ImgPipeline from ...utils.dummy_torch_and_transformers_objects import StableDiffusionDepth2ImgPipeline
......
...@@ -392,10 +392,10 @@ def requires_backends(obj, backends): ...@@ -392,10 +392,10 @@ def requires_backends(obj, backends):
if name in [ if name in [
"StableDiffusionDepth2ImgPipeline", "StableDiffusionDepth2ImgPipeline",
] and is_transformers_version("<", "4.26.0.dev0"): ] and is_transformers_version("<", "4.26.0"):
raise ImportError( raise ImportError(
f"You need to install `transformers` from 'main' in order to use {name}: \n```\n pip install" f"You need to install `transformers>=4.26` in order to use {name}: \n```\n pip install"
" git+https://github.com/huggingface/transformers \n```" " --upgrade transformers \n```"
) )
......
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