Unverified Commit 8cecc66a authored by Chino's avatar Chino Committed by GitHub
Browse files

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

parent 35b66c8e
......@@ -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:
......
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