__init__.py 926 B

12345678910111213141516171819202122
  1. """
  2. Adapted from https://github.com/XPixelGroup/BasicSR
  3. License: Apache-2.0
  4. As of Feb 2024, `basicsr` appears to be unmaintained. It imports a function from `torchvision` that is removed in
  5. `torchvision` 0.17. Here is the deprecation warning:
  6. UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in
  7. 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in
  8. torchvision.transforms.v2.functional.
  9. As a result, a dependency on `basicsr` means we cannot keep our `torchvision` dependency up to date.
  10. Because we only rely on a single class `RRDBNet` from `basicsr`, we've copied the relevant code here and removed the
  11. dependency on `basicsr`.
  12. The code is almost unchanged, only a few type annotations have been added. The license is also copied.
  13. Copy From InvokeAI
  14. """
  15. from .rrdbnet_arch import RRDBNet