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
8fe5a14d
Unverified
Commit
8fe5a14d
authored
Apr 30, 2025
by
Aryan
Committed by
GitHub
Apr 30, 2025
Browse files
Raise warning instead of error for block offloading with streams (#11425)
raise warning instead of error
parent
58431f10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/diffusers/hooks/group_offloading.py
src/diffusers/hooks/group_offloading.py
+4
-1
No files found.
src/diffusers/hooks/group_offloading.py
View file @
8fe5a14d
...
@@ -499,7 +499,10 @@ def _apply_group_offloading_block_level(
...
@@ -499,7 +499,10 @@ def _apply_group_offloading_block_level(
the CPU memory is a bottleneck but may counteract the benefits of using streams.
the CPU memory is a bottleneck but may counteract the benefits of using streams.
"""
"""
if
stream
is
not
None
and
num_blocks_per_group
!=
1
:
if
stream
is
not
None
and
num_blocks_per_group
!=
1
:
raise
ValueError
(
f
"Using streams is only supported for num_blocks_per_group=1. Got
{
num_blocks_per_group
=
}
."
)
logger
.
warning
(
f
"Using streams is only supported for num_blocks_per_group=1. Got
{
num_blocks_per_group
=
}
. Setting it to 1."
)
num_blocks_per_group
=
1
# Create module groups for ModuleList and Sequential blocks
# Create module groups for ModuleList and Sequential blocks
modules_with_group_offloading
=
set
()
modules_with_group_offloading
=
set
()
...
...
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