Skip to content

Commit

Permalink
tests: adds remix test image checks + comparison images
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Mar 19, 2024
1 parent 3be8a54 commit f98cdcd
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 22 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 17 additions & 22 deletions tests/test_horde_inference_cascade.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,7 @@ def test_cascade_image_to_image(
image_result.image.save(f"images/{img_filename}", quality=100)
img_pairs_to_check.append((f"images_expected/{img_filename}", image_result.image))

# assert check_single_inference_image_similarity(
# "images_expected/stable_cascade_image_to_image.png",
# "images/stable_cascade_text_to_image_n_iter_0.png",
# )

# assert check_list_inference_images_similarity(img_pairs_to_check)
assert check_list_inference_images_similarity(img_pairs_to_check)

def test_cascade_image_remix_single(
self,
Expand Down Expand Up @@ -187,10 +182,10 @@ def test_cascade_image_remix_single(
img_filename = "stable_cascade_image_remix_single.png"
pil_image.save(f"images/{img_filename}", quality=100)

# assert check_single_inference_image_similarity(
# f"images_expected/{img_filename}",
# pil_image,
# )
assert check_single_inference_image_similarity(
f"images_expected/{img_filename}",
pil_image,
)

def test_cascade_image_remix_double(
self,
Expand Down Expand Up @@ -230,10 +225,10 @@ def test_cascade_image_remix_double(
img_filename = "stable_cascade_image_remix_double.png"
pil_image.save(f"images/{img_filename}", quality=100)

# assert check_single_inference_image_similarity(
# f"images_expected/{img_filename}",
# pil_image,
# )
assert check_single_inference_image_similarity(
f"images_expected/{img_filename}",
pil_image,
)

def test_cascade_image_remix_double_weak(
self,
Expand Down Expand Up @@ -274,10 +269,10 @@ def test_cascade_image_remix_double_weak(
img_filename = "stable_cascade_image_remix_double_weak.png"
pil_image.save(f"images/{img_filename}", quality=100)

# assert check_single_inference_image_similarity(
# f"images_expected/{img_filename}",
# pil_image,
# )
assert check_single_inference_image_similarity(
f"images_expected/{img_filename}",
pil_image,
)

def test_cascade_image_remix_triple(
self,
Expand Down Expand Up @@ -320,7 +315,7 @@ def test_cascade_image_remix_triple(
img_filename = "stable_cascade_image_remix_triple.png"
pil_image.save(f"images/{img_filename}", quality=100)

# assert check_single_inference_image_similarity(
# f"images_expected/{img_filename}",
# pil_image,
# )
assert check_single_inference_image_similarity(
f"images_expected/{img_filename}",
pil_image,
)

0 comments on commit f98cdcd

Please sign in to comment.