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
138 stars 12 forks source link

Always unwrap single-key state dicts #206

Closed RunDevelopment closed 6 months ago

RunDevelopment commented 6 months ago

This implements Joey's idea:

To potentially support more things that do that, could we check if the top level keys length is 1, and if that key contains a dict? If so, then unwrap it, regardless of what it is