Skip to content

Commit 520bb08

Browse files
fixes tests
1 parent 8faa822 commit 520bb08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/pipelines/stable_diffusion_2/test_stable_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def test_callback_fn(step: int, timestep: int, latents: torch.FloatTensor) -> No
674674
latents = latents.detach().cpu().numpy()
675675
assert latents.shape == (1, 4, 64, 64)
676676
latents_slice = latents[0, -3:, -3:, -1]
677-
expected_slice = np.array([1.078, 1.1804, 1.1339, 0.4664, -0.2354, 0.6097, -0.7749, -0.8784, -0.9465])
677+
expected_slice = np.array([1.0757, 1.1860, 1.1410, 0.4645, -0.2476, 0.6100, -0.7755, -0.8841, -0.9497])
678678
assert np.abs(latents_slice.flatten() - expected_slice).max() < 1e-2
679679

680680
test_callback_fn.has_been_called = False

tests/pipelines/versatile_diffusion/test_versatile_diffusion_mega.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,5 @@ def test_inference_dual_guided_then_text_to_image(self):
124124
image_slice = image[0, 253:256, 253:256, -1]
125125

126126
assert image.shape == (1, 512, 512, 3)
127-
expected_slice = np.array([0.3479, 0.1943, 0.1060, 0.3894, 0.2537, 0.1394, 0.3989, 0.3191, 0.1987])
127+
expected_slice = np.array([0.3403, 0.1809, 0.0938, 0.3855, 0.2393, 0.1243, 0.4028, 0.3110, 0.1799])
128128
assert np.abs(image_slice.flatten() - expected_slice).max() < 1e-2

0 commit comments

Comments
 (0)