Skip to content

Commit

Permalink
add test_multi_upscaler_small to check that MultiUpscaler works with …
Browse files Browse the repository at this point in the history
…small (16x16px) images
  • Loading branch information
Laurent2916 committed Oct 1, 2024
1 parent 7b6f973 commit 1c05d7c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/e2e/test_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -2675,6 +2675,16 @@ def test_multi_upscaler(
ensure_similar_images(predicted_image, expected_multi_upscaler, min_psnr=35, min_ssim=0.99)


@no_grad()
def test_multi_upscaler_small(
multi_upscaler: MultiUpscaler,
clarity_example: Image.Image,
) -> None:
image = clarity_example.resize((16, 16))
image = multi_upscaler.upscale(image) # check we can upscale a small image
image = multi_upscaler.upscale(image) # check we can upscale it twice


@pytest.fixture(scope="module")
def expected_ic_light(ref_path: Path) -> Image.Image:
return _img_open(ref_path / "expected_ic_light.png").convert("RGB")
Expand Down

0 comments on commit 1c05d7c

Please sign in to comment.