1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix the bug that torch version less than 1.12 throws TypeError (#1671)

This commit is contained in:
Chino
2022-12-15 04:29:39 +08:00
committed by GitHub
parent 35b66c8e32
commit 8cecc66a74

View File

@@ -204,7 +204,7 @@ try:
if _torch_available:
import torch
if torch.__version__ < version.Version("1.12"):
if version.Version(torch.__version__) < version.Version("1.12"):
raise ValueError("PyTorch should be >= 1.12")
logger.debug(f"Successfully imported xformers version {_xformers_version}")
except importlib_metadata.PackageNotFoundError: