Skip to content

Commit

Permalink
Remove size requirements for FBCNN
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Nov 18, 2023
1 parent f5c2546 commit 605e1ab
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/spandrel/architectures/FBCNN/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from ...__helpers.model_descriptor import (
RestorationModelDescriptor,
SizeRequirements,
StateDict,
)
from .arch.FBCNN import FBCNN
Expand Down Expand Up @@ -47,5 +46,4 @@ def load(state_dict: StateDict) -> RestorationModelDescriptor[FBCNN]:
supports_bfloat16=True, # TODO
input_channels=in_nc,
output_channels=out_nc,
size_requirements=SizeRequirements(minimum=16), # TODO
)
Binary file added tests/images/inputs/8x8.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/fbcnn_color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/test_FBCNN.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_FBCNN_color(snapshot):
model = ModelLoader().load_from_file(file.path)
assert model == snapshot(exclude=disallowed_props)
assert isinstance(model.model, FBCNN)
assert_image_inference(file, model, [TestImage.JPEG_15])
assert_image_inference(file, model, [TestImage.JPEG_15, TestImage.SR_8])


def test_FBCNN_gray(snapshot):
Expand Down
1 change: 1 addition & 0 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def get_h_w_c(image: np.ndarray) -> tuple[int, int, int]:


class TestImage(Enum):
SR_8 = "8x8.png"
SR_16 = "16x16.png"
SR_32 = "32x32.png"
SR_64 = "64x64.png"
Expand Down

0 comments on commit 605e1ab

Please sign in to comment.