Skip to content

Commit f6ed75b

Browse files
authored
Merge branch 'main' into unidiffuser-xpu
2 parents f046b8b + 8fe5a14 commit f6ed75b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diffusers/hooks/group_offloading.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,10 @@ def _apply_group_offloading_block_level(
499499
the CPU memory is a bottleneck but may counteract the benefits of using streams.
500500
"""
501501
if stream is not None and num_blocks_per_group != 1:
502-
raise ValueError(f"Using streams is only supported for num_blocks_per_group=1. Got {num_blocks_per_group=}.")
502+
logger.warning(
503+
f"Using streams is only supported for num_blocks_per_group=1. Got {num_blocks_per_group=}. Setting it to 1."
504+
)
505+
num_blocks_per_group = 1
503506

504507
# Create module groups for ModuleList and Sequential blocks
505508
modules_with_group_offloading = set()

0 commit comments

Comments
 (0)