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
215bb408
Unverified
Commit
215bb408
authored
Oct 04, 2022
by
Pedro Cuenca
Committed by
GitHub
Oct 04, 2022
Browse files
Fix import if PyTorch is not installed (#715)
* Fix import if PyTorch is not installed. * Style (blank line)
parent
5ac1f61c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/diffusers/utils/__init__.py
src/diffusers/utils/__init__.py
+4
-1
No files found.
src/diffusers/utils/__init__.py
View file @
215bb408
...
...
@@ -37,7 +37,10 @@ from .import_utils import (
)
from
.logging
import
get_logger
from
.outputs
import
BaseOutput
from
.testing_utils
import
floats_tensor
,
load_image
,
parse_flag_from_env
,
slow
,
torch_device
if
is_torch_available
():
from
.testing_utils
import
floats_tensor
,
load_image
,
parse_flag_from_env
,
slow
,
torch_device
logger
=
get_logger
(
__name__
)
...
...
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