chaiNNer-org / spandrel

Spandrel gives your project support for various PyTorch architectures meant for AI Super-Resolution, restoration, and inpainting. Based on the model support implemented in chaiNNer.
MIT License
139 stars 12 forks source link

More size requirements fuzzing #126

Closed RunDevelopment closed 8 months ago

RunDevelopment commented 8 months ago

Changes:

SCUNet is weird. The actual minimum size I experimentally determined is 34, but that number seems to depend on the configuration (somehow). So I just set it 40 and called it a day. Should be good enough.

CodeFormer is a bit of a problem. CodeFormer requires images to be exactly 512x512. Nothing else works. Given that we don't have a maximum size, we currently cannot express this requirement. So I just made it a multiple of 512 and square.

I wonder whether it's worth to add a maximum size bound. I'm not sure what the default should be, though.

joeyballentine commented 8 months ago

Why not make the maximum int | None with a default of None?

RunDevelopment commented 8 months ago

We could, but I'm not sure whether it's the best solution. Well, I would do this change in a separate PR anyway.

zelenooki87 commented 8 months ago

Much respect to you good guys. My favorite architecture after these changes, FemaSR, works flawlessly on arbitrary photo dimensions.