Skip to content

Commit

Permalink
Add image tests for newly added model tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyballentine committed Nov 20, 2023
1 parent 8700592 commit 4aabff3
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 0 deletions.
Binary file added tests/images/outputs/16x16/2x-BIGOLDIES.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/16x16/4x-NMKD-YandereNeo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/16x16/8x-ESRGAN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/32x32/2x-BIGOLDIES.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/32x32/4x-NMKD-YandereNeo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/32x32/8x-ESRGAN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/64x64/2x-BIGOLDIES.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/64x64/4x-NMKD-YandereNeo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/64x64/8x-ESRGAN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/8x8/2x-BIGOLDIES.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/8x8/4x-NMKD-YandereNeo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tests/images/outputs/8x8/8x-ESRGAN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions tests/test_ESRGAN.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def test_ESRGAN_community_2x(snapshot):
model = ModelLoader().load_from_file(file.path)
assert model == snapshot(exclude=disallowed_props)
assert isinstance(model.model, RRDBNet)
assert_image_inference(
file,
model,
[TestImage.SR_8, TestImage.SR_16, TestImage.SR_32, TestImage.SR_64],
)


def test_ESRGAN_community_4x(snapshot):
Expand All @@ -34,6 +39,11 @@ def test_ESRGAN_community_4x(snapshot):
model = ModelLoader().load_from_file(file.path)
assert model == snapshot(exclude=disallowed_props)
assert isinstance(model.model, RRDBNet)
assert_image_inference(
file,
model,
[TestImage.SR_8, TestImage.SR_16, TestImage.SR_32, TestImage.SR_64],
)


def test_ESRGAN_community_8x(snapshot):
Expand All @@ -43,6 +53,11 @@ def test_ESRGAN_community_8x(snapshot):
model = ModelLoader().load_from_file(file.path)
assert model == snapshot(exclude=disallowed_props)
assert isinstance(model.model, RRDBNet)
assert_image_inference(
file,
model,
[TestImage.SR_8, TestImage.SR_16, TestImage.SR_32, TestImage.SR_64],
)


def test_BSRGAN(snapshot):
Expand Down

0 comments on commit 4aabff3

Please sign in to comment.