Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
add models
Browse files- app.py +5 -2
- export_model.py +2 -2
- saved_model/19/config.json +3 -0
- saved_model/19/cover.png +3 -0
- saved_model/19/model.pth +3 -0
- saved_model/20/config.json +3 -0
- saved_model/20/cover.jpeg +3 -0
- saved_model/20/model.pth +3 -0
- saved_model/info.json +2 -2
app.py
CHANGED
@@ -185,8 +185,11 @@ if __name__ == '__main__':
|
|
185 |
**hps.model)
|
186 |
utils.load_checkpoint(model_path, model, None)
|
187 |
model.eval().to(device)
|
188 |
-
|
189 |
-
|
|
|
|
|
|
|
190 |
|
191 |
t = info["type"]
|
192 |
if t == "vits":
|
|
|
185 |
**hps.model)
|
186 |
utils.load_checkpoint(model_path, model, None)
|
187 |
model.eval().to(device)
|
188 |
+
if isinstance(hps.speakers, utils.HParams):
|
189 |
+
speakers, speaker_ids = zip(*hps.speakers.items())
|
190 |
+
else:
|
191 |
+
speaker_ids = [sid for sid, name in enumerate(hps.speakers) if name != "None"]
|
192 |
+
speakers = [name for sid, name in enumerate(hps.speakers) if name != "None"]
|
193 |
|
194 |
t = info["type"]
|
195 |
if t == "vits":
|
export_model.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import torch
|
2 |
|
3 |
if __name__ == '__main__':
|
4 |
-
model_path = "saved_model/
|
5 |
-
output_path = "saved_model/
|
6 |
checkpoint_dict = torch.load(model_path, map_location='cpu')
|
7 |
checkpoint_dict_new = {}
|
8 |
for k, v in checkpoint_dict.items():
|
|
|
1 |
import torch
|
2 |
|
3 |
if __name__ == '__main__':
|
4 |
+
model_path = "saved_model/19/model.pth"
|
5 |
+
output_path = "saved_model/19/model1.pth"
|
6 |
checkpoint_dict = torch.load(model_path, map_location='cpu')
|
7 |
checkpoint_dict_new = {}
|
8 |
for k, v in checkpoint_dict.items():
|
saved_model/19/config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2b58c83def56c61fb64a937fe4485f0a35817abc5df8332cb58fc30cbba19c76
|
3 |
+
size 8812
|
saved_model/19/cover.png
ADDED
Git LFS Details
|
saved_model/19/model.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e250a75c0fb446825edcfba0b1ebc0872afff50143d66f3327a3eeb628bd874
|
3 |
+
size 159065393
|
saved_model/20/config.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:540163625e921ccbbf435e96affff02f99b36f9ffcaa47e57b01031a7721b696
|
3 |
+
size 3572
|
saved_model/20/cover.jpeg
ADDED
Git LFS Details
|
saved_model/20/model.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4eebab160b105e0c024d2291715eb38063d8fad0b26fa76624e84e0e7057f8f5
|
3 |
+
size 159706189
|
saved_model/info.json
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0fd9d81ee48f1bc53f16eb05b90a6ae916b4a67afd89d33795522747c229b277
|
3 |
+
size 5485
|