Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
8cecc66a
Unverified
Commit
8cecc66a
authored
Dec 15, 2022
by
Chino
Committed by
GitHub
Dec 14, 2022
Browse files
Fix the bug that torch version less than 1.12 throws TypeError (#1671)
parent
35b66c8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/utils/import_utils.py
src/diffusers/utils/import_utils.py
+1
-1
No files found.
src/diffusers/utils/import_utils.py
View file @
8cecc66a
...
@@ -204,7 +204,7 @@ try:
...
@@ -204,7 +204,7 @@ try:
if
_torch_available
:
if
_torch_available
:
import
torch
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"
)
raise
ValueError
(
"PyTorch should be >= 1.12"
)
logger
.
debug
(
f
"Successfully imported xformers version
{
_xformers_version
}
"
)
logger
.
debug
(
f
"Successfully imported xformers version
{
_xformers_version
}
"
)
except
importlib_metadata
.
PackageNotFoundError
:
except
importlib_metadata
.
PackageNotFoundError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment