Skip to content

Commit b97bfb6

Browse files
authored
Merge branch 'main' into pipelines-xpu
2 parents 2aaa104 + 8fe5a14 commit b97bfb6

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
@@ -512,7 +512,10 @@ def _apply_group_offloading_block_level(
512512
the CPU memory is a bottleneck but may counteract the benefits of using streams.
513513
"""
514514
if stream is not None and num_blocks_per_group != 1:
515-
raise ValueError(f"Using streams is only supported for num_blocks_per_group=1. Got {num_blocks_per_group=}.")
515+
logger.warning(
516+
f"Using streams is only supported for num_blocks_per_group=1. Got {num_blocks_per_group=}. Setting it to 1."
517+
)
518+
num_blocks_per_group = 1
516519

517520
# Create module groups for ModuleList and Sequential blocks
518521
modules_with_group_offloading = set()

0 commit comments

Comments
 (0)