We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05e8677 commit 03b28d7Copy full SHA for 03b28d7
tests/quantization/bnb/test_4bit.py
@@ -96,6 +96,10 @@ class Base4bitTests(unittest.TestCase):
96
num_inference_steps = 10
97
seed = 0
98
99
+ @classmethod
100
+ def setUpClass(cls):
101
+ torch.use_deterministic_algorithms(True)
102
+
103
def get_dummy_inputs(self):
104
prompt_embeds = load_pt(
105
"https://huggingface.co/datasets/hf-internal-testing/bnb-diffusers-testing-artifacts/resolve/main/prompt_embeds.pt",
@@ -480,7 +484,6 @@ def test_generate_quality_dequantize(self):
480
484
r"""
481
485
Test that loading the model and unquantize it produce correct results.
482
486
"""
483
- torch.use_deterministic_algorithms(True)
487
self.pipeline_4bit.transformer.dequantize()
488
output = self.pipeline_4bit(
489
prompt=self.prompt,
0 commit comments