Skip to content

Commit 2076a53

Browse files
committed
explain duck shapes
1 parent 3f76c09 commit 2076a53

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/models/test_modeling_common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,6 +2262,9 @@ def test_hotswapping_compile_on_different_shapes(self, rank0, rank1):
22622262
different_shapes_for_compilation = self.different_shapes_for_compilation
22632263
if different_shapes_for_compilation is None:
22642264
pytest.skip(f"Skipping as `different_shapes_for_compilation` is not set for {self.__class__.__name__}.")
2265+
# Specifying `use_duck_shape=False` instructs the compiler if it should use the same symbolic
2266+
# variable to represent input sizes that are the same. For more details,
2267+
# check out this [comment](https://github.com/huggingface/diffusers/pull/11327#discussion_r2047659790).
22652268
torch.fx.experimental._config.use_duck_shape = False
22662269

22672270
target_modules = ["to_q", "to_k", "to_v", "to_out.0"]

0 commit comments

Comments
 (0)