fix: merge f0 option value (#298)

Co-authored-by: 源文雨 <41315874+fumiama@users.noreply.github.com>
This commit is contained in:
Yugo Ogura 2023-05-17 14:38:21 +09:00 committed by GitHub
parent 2ec95ab288
commit da0b599fa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1668,7 +1668,7 @@ with gr.Blocks() as app:
ckpt_b,
alpha_a,
sr_,
if_f0_,
1 if if_f0_ == i18n("") else 0,
info__,
name_to_save0,
version_2,

View File

@ -194,7 +194,7 @@ def change_info(path, info, name):
return traceback.format_exc()
def merge(path1, path2, alpha1, sr, f0, info, name, version):
def merge(path1, path2, alpha1, sr, if_f0, info, name, version):
try:
def extract(ckpt):
@ -243,7 +243,7 @@ def merge(path1, path2, alpha1, sr, f0, info, name, version):
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]
"""
opt["sr"] = sr
opt["f0"] = 1 if f0 == "" else 0
opt["f0"] = if_f0
opt["version"] = version
opt["info"] = info
torch.save(opt, "weights/%s.pth" % name)