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

Save Real-CUGAN models correctly #119

Closed RunDevelopment closed 9 months ago

RunDevelopment commented 9 months ago

Fixes #89.

As I described in #89, I used an optional buffer called "pro" to save a "pro" key in the state dict. This ensures that the key is present only in pro models.

Since the official code only checks for the existence of the "pro" key and not its value, it doesn't matter we store a tensor instead of an int. So this solution is compatible with official arch code.