Skip to content

Commit da0b599

Browse files
Spice-Zfumiama
andauthored
fix: merge f0 option value (#298)
Co-authored-by: 源文雨 <[email protected]>
1 parent 2ec95ab commit da0b599

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

infer-web.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ def export_onnx(ModelPath, ExportedPath, MoeVS=True):
16681668
ckpt_b,
16691669
alpha_a,
16701670
sr_,
1671-
if_f0_,
1671+
1 if if_f0_ == i18n("是") else 0,
16721672
info__,
16731673
name_to_save0,
16741674
version_2,

train/process_ckpt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def change_info(path, info, name):
194194
return traceback.format_exc()
195195

196196

197-
def merge(path1, path2, alpha1, sr, f0, info, name, version):
197+
def merge(path1, path2, alpha1, sr, if_f0, info, name, version):
198198
try:
199199

200200
def extract(ckpt):
@@ -243,7 +243,7 @@ def extract(ckpt):
243243
elif(sr=="32k"):opt["config"] = [513, 32, 192, 192, 768, 2, 6, 3, 0, "1", [3, 7, 11], [[1, 3, 5], [1, 3, 5], [1, 3, 5]], [10, 4, 2, 2, 2], 512, [16, 16, 4, 4,4], 109, 256, 32000]
244244
"""
245245
opt["sr"] = sr
246-
opt["f0"] = 1 if f0 == "是" else 0
246+
opt["f0"] = if_f0
247247
opt["version"] = version
248248
opt["info"] = info
249249
torch.save(opt, "weights/%s.pth" % name)

0 commit comments

Comments
 (0)