Skip to content

Commit

Permalink
[CI] Match remaining assertions from big runner (huggingface#10521)
Browse files Browse the repository at this point in the history
* print

* remove print.

* print

* update slice.

* empty
  • Loading branch information
sayakpaul authored Jan 10, 2025
1 parent 52c05bd commit 9f06a0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/lora/test_lora_layers_sd3.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_sd3_img2img_lora(self):

image = pipe(**inputs).images[0]
image_slice = image[0, -3:, -3:]
expected_slice = np.array([0.5396, 0.5776, 0.7432, 0.5151, 0.5586, 0.7383, 0.5537, 0.5933, 0.7153])
expected_slice = np.array([0.5649, 0.5405, 0.5488, 0.5688, 0.5449, 0.5513, 0.5337, 0.5107, 0.5059])

max_diff = numpy_cosine_similarity_distance(expected_slice.flatten(), image_slice.flatten())

Expand Down
2 changes: 1 addition & 1 deletion tests/quantization/bnb/test_mixed_int8.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def test_quality(self):
output_type="np",
).images
out_slice = output[0, -3:, -3:, -1].flatten()
expected_slice = np.array([0.0376, 0.0359, 0.0015, 0.0449, 0.0479, 0.0098, 0.0083, 0.0295, 0.0295])
expected_slice = np.array([0.0674, 0.0623, 0.0364, 0.0632, 0.0671, 0.0430, 0.0317, 0.0493, 0.0583])

max_diff = numpy_cosine_similarity_distance(expected_slice, out_slice)
self.assertTrue(max_diff < 1e-2)
Expand Down

0 comments on commit 9f06a0d

Please sign in to comment.