We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f61512 commit 0827a05Copy full SHA for 0827a05
sdkit/models/model_loader/codeformer/__init__.py
@@ -1,3 +1,19 @@
1
+# hack for basicsr https://github.com/XPixelGroup/BasicSR/pull/650
2
+# credit: https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14186/files
3
+
4
+import sys
5
6
+try:
7
+ import torchvision.transforms.functional_tensor
8
+except ImportError:
9
+ try:
10
+ import torchvision.transforms.functional as functional
11
12
+ sys.modules["torchvision.transforms.functional_tensor"] = functional
13
+ except ImportError:
14
+ pass
15
+# /hack
16
17
from .codeformer_arch import CodeFormer
18
19
from sdkit import Context
0 commit comments