Spaces:
Running
on
Zero
Running
on
Zero
modified
Browse files- requirements.txt +1 -1
- scripts/model.py +1 -1
requirements.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
torch==2.2.0
|
3 |
torchvision==0.17.0
|
4 |
torchaudio==2.2.0
|
5 |
-
diffusers==0.
|
6 |
Flask==3.0.3
|
7 |
Flask-Cors==4.0.0
|
8 |
Flask-SocketIO==5.3.6
|
|
|
2 |
torch==2.2.0
|
3 |
torchvision==0.17.0
|
4 |
torchaudio==2.2.0
|
5 |
+
diffusers==0.27.4 # pth file cannot be loaded in the latest version
|
6 |
Flask==3.0.3
|
7 |
Flask-Cors==4.0.0
|
8 |
Flask-SocketIO==5.3.6
|
scripts/model.py
CHANGED
@@ -154,7 +154,7 @@ def create_model(model, use_local):
|
|
154 |
|
155 |
import os
|
156 |
if model == 'default':
|
157 |
-
model_path =
|
158 |
|
159 |
ckpt = torch.load(model_path)
|
160 |
for key in list(ckpt.keys()):
|
|
|
154 |
|
155 |
import os
|
156 |
if model == 'default':
|
157 |
+
model_path = "models/Anime2Sketch/netG.pth" if use_local else download_file("netG.pth", "models/Anime2Sketch")
|
158 |
|
159 |
ckpt = torch.load(model_path)
|
160 |
for key in list(ckpt.keys()):
|