Spaces:
Build error
Build error
秋山翔
commited on
Commit
·
cd1eaaf
1
Parent(s):
f45a1a1
MAINT: pretrained models
Browse files- app.py +3 -5
- models/hosoda_mamoru.pth +3 -0
- models/kon_satoshi.pth +3 -0
- models/miyazaki_hayao.pth +3 -0
- models/shinkai_makoto.pth +3 -0
app.py
CHANGED
@@ -12,14 +12,12 @@ from torch.autograd import Variable
|
|
12 |
from network.Transformer import Transformer
|
13 |
|
14 |
LOAD_SIZE = 1280
|
15 |
-
STYLE = "
|
16 |
-
MODEL_PATH = "
|
17 |
COLOUR_MODEL = "RGB"
|
18 |
|
19 |
model = Transformer()
|
20 |
-
model.load_state_dict(
|
21 |
-
torch.load(os.path.join(MODEL_PATH, f"{STYLE}_net_G_float.pth"))
|
22 |
-
)
|
23 |
model.eval()
|
24 |
|
25 |
disable_gpu = torch.cuda.is_available()
|
|
|
12 |
from network.Transformer import Transformer
|
13 |
|
14 |
LOAD_SIZE = 1280
|
15 |
+
STYLE = "shinkai_makoto"
|
16 |
+
MODEL_PATH = "models"
|
17 |
COLOUR_MODEL = "RGB"
|
18 |
|
19 |
model = Transformer()
|
20 |
+
model.load_state_dict(torch.load(os.path.join(MODEL_PATH, f"{STYLE}.pth")))
|
|
|
|
|
21 |
model.eval()
|
22 |
|
23 |
disable_gpu = torch.cuda.is_available()
|
models/hosoda_mamoru.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c666eea7700864d5972765cc43e926d900174648297bfef494006dc230fd1bf0
|
3 |
+
size 44529096
|
models/kon_satoshi.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0629352a54838e56a2ad7fca3e6e51e6889d4338c37469f9ddb43e5929ef9475
|
3 |
+
size 44529096
|
models/miyazaki_hayao.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8ab0e492efb3b705487db38679e363dc8b1f016692913bbe100587d695a9e2b5
|
3 |
+
size 44529096
|
models/shinkai_makoto.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c3547f611e780e79aebde7f7bc2b6c278555d701620f125583d666351044c486
|
3 |
+
size 44529096
|