feat(model): added nahida-jp and hutao-jp
Browse files- app-full.py +8 -8
- app.py +8 -8
- weights/genshin-impact/hutao-jp/added_IVF1662_Flat_nprobe_1.index +3 -0
- weights/genshin-impact/hutao-jp/cover.png +3 -0
- weights/genshin-impact/hutao-jp/hutao-jp.pth +3 -0
- weights/genshin-impact/model_info.json +16 -0
- weights/genshin-impact/nahida-jp/added_IVF2062_Flat_nprobe_1.index +3 -0
- weights/genshin-impact/nahida-jp/cover.png +3 -0
- weights/genshin-impact/nahida-jp/nahida-jp.pth +3 -0
app-full.py
CHANGED
@@ -163,14 +163,14 @@ if __name__ == '__main__':
|
|
163 |
models = []
|
164 |
with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
|
165 |
models_info = json.load(f)
|
166 |
-
for
|
167 |
if not info['enable']:
|
168 |
continue
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
cpt = torch.load(f"weights/{category_folder}/{
|
174 |
tgt_sr = cpt["config"][-1]
|
175 |
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
|
176 |
if_f0 = cpt.get("f0", 1)
|
@@ -186,8 +186,8 @@ if __name__ == '__main__':
|
|
186 |
else:
|
187 |
net_g = net_g.float()
|
188 |
vc = VC(tgt_sr, config)
|
189 |
-
print(f"Model loaded: {
|
190 |
-
models.append((
|
191 |
categories.append([category_title, category_folder, description, models])
|
192 |
with gr.Blocks() as app:
|
193 |
gr.Markdown(
|
|
|
163 |
models = []
|
164 |
with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
|
165 |
models_info = json.load(f)
|
166 |
+
for model_name, info in models_info.items():
|
167 |
if not info['enable']:
|
168 |
continue
|
169 |
+
model_title = info['title']
|
170 |
+
model_author = info.get("author", None)
|
171 |
+
model_cover = f"weights/{category_folder}/{model_name}/{info['cover']}"
|
172 |
+
model_index = f"weights/{category_folder}/{model_name}/{info['feature_retrieval_library']}"
|
173 |
+
cpt = torch.load(f"weights/{category_folder}/{model_name}/{model_name}.pth", map_location="cpu")
|
174 |
tgt_sr = cpt["config"][-1]
|
175 |
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
|
176 |
if_f0 = cpt.get("f0", 1)
|
|
|
186 |
else:
|
187 |
net_g = net_g.float()
|
188 |
vc = VC(tgt_sr, config)
|
189 |
+
print(f"Model loaded: {model_name}")
|
190 |
+
models.append((model_name, model_title, model_author, model_cover, create_vc_fn(tgt_sr, net_g, vc, if_f0, index)))
|
191 |
categories.append([category_title, category_folder, description, models])
|
192 |
with gr.Blocks() as app:
|
193 |
gr.Markdown(
|
app.py
CHANGED
@@ -110,14 +110,14 @@ if __name__ == '__main__':
|
|
110 |
models = []
|
111 |
with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
|
112 |
models_info = json.load(f)
|
113 |
-
for
|
114 |
if not info['enable']:
|
115 |
continue
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
cpt = torch.load(f"weights/{category_folder}/{
|
121 |
tgt_sr = cpt["config"][-1]
|
122 |
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
|
123 |
if_f0 = cpt.get("f0", 1)
|
@@ -133,8 +133,8 @@ if __name__ == '__main__':
|
|
133 |
else:
|
134 |
net_g = net_g.float()
|
135 |
vc = VC(tgt_sr, config)
|
136 |
-
print(f"Model loaded: {
|
137 |
-
models.append((
|
138 |
categories.append([category_title, category_folder, description, models])
|
139 |
with gr.Blocks() as app:
|
140 |
gr.Markdown(
|
|
|
110 |
models = []
|
111 |
with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
|
112 |
models_info = json.load(f)
|
113 |
+
for model_name, info in models_info.items():
|
114 |
if not info['enable']:
|
115 |
continue
|
116 |
+
model_title = info['title']
|
117 |
+
model_author = info.get("author", None)
|
118 |
+
model_cover = f"weights/{category_folder}/{model_name}/{info['cover']}"
|
119 |
+
model_index = f"weights/{category_folder}/{model_name}/{info['feature_retrieval_library']}"
|
120 |
+
cpt = torch.load(f"weights/{category_folder}/{model_name}/{model_name}.pth", map_location="cpu")
|
121 |
tgt_sr = cpt["config"][-1]
|
122 |
cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk
|
123 |
if_f0 = cpt.get("f0", 1)
|
|
|
133 |
else:
|
134 |
net_g = net_g.float()
|
135 |
vc = VC(tgt_sr, config)
|
136 |
+
print(f"Model loaded: {model_name}")
|
137 |
+
models.append((model_name, model_title, model_author, model_cover, create_vc_fn(tgt_sr, net_g, vc, if_f0, index)))
|
138 |
categories.append([category_title, category_folder, description, models])
|
139 |
with gr.Blocks() as app:
|
140 |
gr.Markdown(
|
weights/genshin-impact/hutao-jp/added_IVF1662_Flat_nprobe_1.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bd05a09ce5340a59c9487a650cc17d1e52ab8c64e6ec90a34b027c5fa995b432
|
3 |
+
size 68629171
|
weights/genshin-impact/hutao-jp/cover.png
ADDED
Git LFS Details
|
weights/genshin-impact/hutao-jp/hutao-jp.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d87a656e79015a368bd8e02937640dd63fe4af4ba7140cff132102a3092ddf0d
|
3 |
+
size 55027130
|
weights/genshin-impact/model_info.json
CHANGED
@@ -71,6 +71,22 @@
|
|
71 |
"feature_retrieval_library": "added_IVF2765_Flat_nprobe_1.index",
|
72 |
"author":"ArkanDash"
|
73 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
"fischl-jp": {
|
75 |
"enable": true,
|
76 |
"name": "fischl-jp",
|
|
|
71 |
"feature_retrieval_library": "added_IVF2765_Flat_nprobe_1.index",
|
72 |
"author":"ArkanDash"
|
73 |
},
|
74 |
+
"hutao-jp": {
|
75 |
+
"enable": true,
|
76 |
+
"name": "hutao-jp",
|
77 |
+
"title": "Genshin Impact - Hutao",
|
78 |
+
"cover": "cover.png",
|
79 |
+
"feature_retrieval_library": "added_IVF1662_Flat_nprobe_1.index",
|
80 |
+
"author":"ArkanDash"
|
81 |
+
},
|
82 |
+
"nahida-jp": {
|
83 |
+
"enable": true,
|
84 |
+
"name": "nahida-jp",
|
85 |
+
"title": "Genshin Impact - Nahida",
|
86 |
+
"cover": "cover.png",
|
87 |
+
"feature_retrieval_library": "added_IVF2062_Flat_nprobe_1.index",
|
88 |
+
"author":"ArkanDash"
|
89 |
+
},
|
90 |
"fischl-jp": {
|
91 |
"enable": true,
|
92 |
"name": "fischl-jp",
|
weights/genshin-impact/nahida-jp/added_IVF2062_Flat_nprobe_1.index
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:77a4b1313f5b4a648de658d12f79841cd76073de82becf95dc72f38ebb764e5b
|
3 |
+
size 85120531
|
weights/genshin-impact/nahida-jp/cover.png
ADDED
Git LFS Details
|
weights/genshin-impact/nahida-jp/nahida-jp.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:636cf49be6cac1e510523a4bff9daf90dc54e2a8a76b8fa1216db8f25332e01b
|
3 |
+
size 55027589
|