Skip to content

Commit

Permalink
fix: assertion for sigma
Browse files Browse the repository at this point in the history
  • Loading branch information
sayakpaul committed May 2, 2024
1 parent c75a8c7 commit 08bf228
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/pipelines/pixart_sigma/test_pixart.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,7 @@ def test_pixart_1024(self):
image = pipe(prompt, generator=generator, num_inference_steps=2, output_type="np").images

image_slice = image[0, -3:, -3:, -1]
print(", ".join([str(round(x, 4)) for x in image_slice.flatten().tolist()]))
expected_slice = np.array([0.0742, 0.0835, 0.2114, 0.0295, 0.0784, 0.2361, 0.1738, 0.2251, 0.3589])
expected_slice = np.array([0.4517, 0.4446, 0.4375, 0.449, 0.4399, 0.4365, 0.4583, 0.4629, 0.4473])

max_diff = numpy_cosine_similarity_distance(image_slice.flatten(), expected_slice)
self.assertLessEqual(max_diff, 1e-4)
Expand Down

0 comments on commit 08bf228

Please sign in to comment.