You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have not investigated this yet but it looks like a small diff. Right now our assertion is pretty strict and does an array_equal comparison on the final image compared to the fixed reference one:
np.testing.assert_array_equal(
np.array(Image.open(output_image_path)),
np.array(Image.open(reference_image_path)),
err_msg=f"Generated image doesn't match reference image. Check {output_image_path} vs {reference_image_path}",
)
When looking at the output of the generated image, it is visually identical to the reference image.
My initial guess is that this is caused by a bug fix in later mlx versions and we should update our reference image to reflect this.
The text was updated successfully, but these errors were encountered:
Did some very quick tests now and running assert_allclose with an absolute tolerance of 55 worked
np.testing.assert_allclose(
np.array(Image.open(output_image_path)),
np.array(Image.open(reference_image_path)),
atol=55,
err_msg=f"Generated image doesn't match reference image. Check {output_image_path} vs {reference_image_path}",
)
When I tried a smaller tolerance, like atol=50 and below, it did not pass. I guess this is a pretty large diff that we would allow in this case, considering that the pixel values of the arrays we compare in np.array(Image.open(output_image_path)) are between 0 and 255. Did not try the other comparison methods yet.
I'll try to look into to other alternatives for this tomorrow.
The test
test_image_generation_schnell
runs fine formlx
versions0.19.0
and below, but from0.19.3
and onwards it gives the following error:Have not investigated this yet but it looks like a small diff. Right now our assertion is pretty strict and does an array_equal comparison on the final image compared to the fixed reference one:
When looking at the output of the generated image, it is visually identical to the reference image.
My initial guess is that this is caused by a bug fix in later mlx versions and we should update our reference image to reflect this.
The text was updated successfully, but these errors were encountered: