From 99af1dfe1c08155e983571a25d68d901fd2837d3 Mon Sep 17 00:00:00 2001 From: Qing Date: Fri, 18 Nov 2022 22:39:21 +0800 Subject: [PATCH] add manga test --- lama_cleaner/tests/test_model.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lama_cleaner/tests/test_model.py b/lama_cleaner/tests/test_model.py index 71cc7ef..7c3ef7d 100644 --- a/lama_cleaner/tests/test_model.py +++ b/lama_cleaner/tests/test_model.py @@ -179,3 +179,19 @@ def test_cv2(strategy, cv2_flag, cv2_radius): img_p=current_dir / "overture-creations-5sI6fQgYIuo.png", mask_p=current_dir / "overture-creations-5sI6fQgYIuo_mask.png", ) + + +@pytest.mark.parametrize("strategy", [HDStrategy.ORIGINAL, HDStrategy.RESIZE, HDStrategy.CROP]) +def test_manga(strategy): + model = ModelManager( + name="manga", + device=torch.device(device), + ) + cfg = get_config(strategy) + assert_equal( + model, + cfg, + f"sd_{strategy.capitalize()}.png", + img_p=current_dir / "overture-creations-5sI6fQgYIuo.png", + mask_p=current_dir / "overture-creations-5sI6fQgYIuo_mask.png", + )