Skip to content

Commit 1c05d7c

Browse files
LaurentLaurent2916
authored andcommitted
add test_multi_upscaler_small to check that MultiUpscaler works with small (16x16px) images
1 parent 7b6f973 commit 1c05d7c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/e2e/test_diffusion.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,6 +2675,16 @@ def test_multi_upscaler(
26752675
ensure_similar_images(predicted_image, expected_multi_upscaler, min_psnr=35, min_ssim=0.99)
26762676

26772677

2678+
@no_grad()
2679+
def test_multi_upscaler_small(
2680+
multi_upscaler: MultiUpscaler,
2681+
clarity_example: Image.Image,
2682+
) -> None:
2683+
image = clarity_example.resize((16, 16))
2684+
image = multi_upscaler.upscale(image) # check we can upscale a small image
2685+
image = multi_upscaler.upscale(image) # check we can upscale it twice
2686+
2687+
26782688
@pytest.fixture(scope="module")
26792689
def expected_ic_light(ref_path: Path) -> Image.Image:
26802690
return _img_open(ref_path / "expected_ic_light.png").convert("RGB")

0 commit comments

Comments
 (0)