Skip to content

Commit f38a644

Browse files
committed
Revert "tighten compilation tests for quantization"
This reverts commit 8d431dc.
1 parent d5c1772 commit f38a644

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

tests/quantization/bnb/test_4bit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,6 @@ def quantization_config(self):
886886
components_to_quantize=["transformer", "text_encoder_2"],
887887
)
888888

889-
@require_bitsandbytes_version_greater("0.46.1")
890889
def test_torch_compile(self):
891890
torch._dynamo.config.capture_dynamic_output_shape_ops = True
892891
super().test_torch_compile()

tests/quantization/test_torch_compile_utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,12 @@ def _test_torch_compile(self, torch_dtype=torch.bfloat16):
5656
pipe.transformer.compile(fullgraph=True)
5757

5858
# small resolutions to ensure speedy execution.
59-
with torch._dynamo.config.patch(error_on_recompile=True):
60-
pipe("a dog", num_inference_steps=2, max_sequence_length=16, height=256, width=256)
59+
pipe("a dog", num_inference_steps=2, max_sequence_length=16, height=256, width=256)
6160

6261
def _test_torch_compile_with_cpu_offload(self, torch_dtype=torch.bfloat16):
6362
pipe = self._init_pipeline(self.quantization_config, torch_dtype)
6463
pipe.enable_model_cpu_offload()
65-
# regional compilation is better for offloading.
66-
# see: https://pytorch.org/blog/torch-compile-and-diffusers-a-hands-on-guide-to-peak-performance/
67-
if getattr(pipe.transformer, "_repeated_blocks"):
68-
pipe.transformer.compile_repeated_blocks(fullgraph=True)
69-
else:
70-
pipe.transformer.compile()
64+
pipe.transformer.compile()
7165

7266
# small resolutions to ensure speedy execution.
7367
pipe("a dog", num_inference_steps=2, max_sequence_length=16, height=256, width=256)

0 commit comments

Comments
 (0)