Spaces:
Runtime error
Runtime error
fix: use half model
Browse files- anime2sketch/model.py +1 -1
anime2sketch/model.py
CHANGED
|
@@ -179,7 +179,7 @@ class Anime2Sketch:
|
|
| 179 |
|
| 180 |
for key in list(ckpt.keys()):
|
| 181 |
if "module." in key:
|
| 182 |
-
ckpt[key.replace("module.", "")] = ckpt[key]
|
| 183 |
del ckpt[key]
|
| 184 |
|
| 185 |
net.load_state_dict(ckpt)
|
|
|
|
| 179 |
|
| 180 |
for key in list(ckpt.keys()):
|
| 181 |
if "module." in key:
|
| 182 |
+
ckpt[key.replace("module.", "")] = ckpt[key].half()
|
| 183 |
del ckpt[key]
|
| 184 |
|
| 185 |
net.load_state_dict(ckpt)
|