Skip to content

Commit

Permalink
Add official tiny model to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyballentine committed May 11, 2024
1 parent efa4585 commit 0632677
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/__snapshots__/test_PLKSR.ambr
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# serializer version: 1
# name: test_PLKSR_official_tiny_x4
ImageModelDescriptor(
architecture=PLKSRArch(
id='PLKSR',
name='PLKSR',
),
input_channels=3,
output_channels=3,
purpose='SR',
scale=4,
size_requirements=SizeRequirements(minimum=1, multiple_of=1, square=False),
supports_bfloat16=True,
supports_half=False,
tags=list([
'64dim',
'28nb',
'13ks',
'DCCM',
]),
tiling=<ModelTiling.SUPPORTED: 1>,
)
# ---
# name: test_PLKSR_official_x2
ImageModelDescriptor(
architecture=PLKSRArch(
Expand Down
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.
15 changes: 15 additions & 0 deletions tests/test_PLKSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ def test_PLKSR_official_x4(snapshot):
)


def test_PLKSR_official_tiny_x4(snapshot):
file = ModelFile.from_url(
"https://drive.google.com/file/d/1d8d_6TF0SrEMiX1jrnLqKnPdKjDJahOK/view",
name="PLKSR_tiny_X4_DIV2K.pth",
)
model = file.load_model()
assert model == snapshot(exclude=disallowed_props)
assert isinstance(model.model, PLKSR)
assert_image_inference(
file,
model,
[TestImage.SR_16, TestImage.SR_32, TestImage.SR_64],
)


def test_PLKSR_official_x3(snapshot):
file = ModelFile.from_url(
"https://drive.google.com/file/d/1W8phbKFTOYL-AnlMJnjx2NWDHZY8jVWW/view",
Expand Down

0 comments on commit 0632677

Please sign in to comment.