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
af9ee873
"Doc/Tutorial_Python.md" did not exist on "bdddfe277f4b56ed959e8a0a5b413f8bf241b779"
Unverified
Commit
af9ee873
authored
Nov 16, 2022
by
Patrick von Platen
Committed by
GitHub
Nov 16, 2022
Browse files
Better error message for transformers dummy (#1306)
parent
8a730645
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/diffusers/pipeline_utils.py
src/diffusers/pipeline_utils.py
+5
-1
No files found.
src/diffusers/pipeline_utils.py
View file @
af9ee873
...
...
@@ -57,6 +57,7 @@ if is_transformers_available():
INDEX_FILE
=
"diffusion_pytorch_model.bin"
CUSTOM_PIPELINE_FILE_NAME
=
"pipeline.py"
DUMMY_MODULES_FOLDER
=
"diffusers.utils"
TRANSFORMERS_DUMMY_MODULES_FOLDER
=
"transformers.utils"
logger
=
logging
.
get_logger
(
__name__
)
...
...
@@ -592,7 +593,10 @@ class DiffusionPipeline(ConfigMixin):
if
load_method_name
is
None
:
none_module
=
class_obj
.
__module__
if
none_module
.
startswith
(
DUMMY_MODULES_FOLDER
)
and
"dummy"
in
none_module
:
is_dummy_path
=
none_module
.
startswith
(
DUMMY_MODULES_FOLDER
)
or
none_module
.
startswith
(
TRANSFORMERS_DUMMY_MODULES_FOLDER
)
if
is_dummy_path
and
"dummy"
in
none_module
:
# call class_obj for nice error message of missing requirements
class_obj
()
...
...
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