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
OpenDAS
diffusers
Commits
81df9c85
Unverified
Commit
81df9c85
authored
Nov 14, 2023
by
Patrick von Platen
Committed by
GitHub
Nov 14, 2023
Browse files
Unwrap models everywhere (#5789)
more debug
parent
bfe94a39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
src/diffusers/pipelines/pipeline_utils.py
src/diffusers/pipelines/pipeline_utils.py
+2
-5
No files found.
src/diffusers/pipelines/pipeline_utils.py
View file @
81df9c85
...
@@ -560,10 +560,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
...
@@ -560,10 +560,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
register_dict
=
{
name
:
(
None
,
None
)}
register_dict
=
{
name
:
(
None
,
None
)}
else
:
else
:
# register the config from the original module, not the dynamo compiled one
# register the config from the original module, not the dynamo compiled one
if
is_compiled_module
(
module
):
not_compiled_module
=
_unwrap_model
(
module
)
not_compiled_module
=
module
.
_orig_mod
else
:
not_compiled_module
=
module
library
=
not_compiled_module
.
__module__
.
split
(
"."
)[
0
]
library
=
not_compiled_module
.
__module__
.
split
(
"."
)[
0
]
...
@@ -666,7 +663,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
...
@@ -666,7 +663,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
# Dynamo wraps the original model in a private class.
# Dynamo wraps the original model in a private class.
# I didn't find a public API to get the original class.
# I didn't find a public API to get the original class.
if
is_compiled_module
(
sub_model
):
if
is_compiled_module
(
sub_model
):
sub_model
=
sub_model
.
_orig
_mod
sub_model
=
_unwrap_model
(
sub
_mod
el
)
model_cls
=
sub_model
.
__class__
model_cls
=
sub_model
.
__class__
save_method_name
=
None
save_method_name
=
None
...
...
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