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
e2033d2d
Unverified
Commit
e2033d2d
authored
Sep 14, 2023
by
Dhruv Nair
Committed by
GitHub
Sep 14, 2023
Browse files
Fix model offload bug when key isn't present (#5030)
* fix model offload bug when key isn't present * make style
parent
19edca82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/pipeline_utils.py
src/diffusers/pipelines/pipeline_utils.py
+1
-1
No files found.
src/diffusers/pipelines/pipeline_utils.py
View file @
e2033d2d
...
@@ -1252,7 +1252,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
...
@@ -1252,7 +1252,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
self
.
_all_hooks
=
[]
self
.
_all_hooks
=
[]
hook
=
None
hook
=
None
for
model_str
in
self
.
model_cpu_offload_seq
.
split
(
"->"
):
for
model_str
in
self
.
model_cpu_offload_seq
.
split
(
"->"
):
model
=
all_model_components
.
pop
(
model_str
)
model
=
all_model_components
.
pop
(
model_str
,
None
)
if
not
isinstance
(
model
,
torch
.
nn
.
Module
):
if
not
isinstance
(
model
,
torch
.
nn
.
Module
):
continue
continue
...
...
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