1
0
mirror of synced 2024-11-28 01:10:56 +01:00

Revert "fix: merge f0 option value (#298)" (#303)

This reverts commit da0b599fa7.
This commit is contained in:
源文雨 2023-05-17 23:17:01 +08:00 committed by GitHub
parent 30c7e417e8
commit e5374b2041
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, ckpt_b,
alpha_a, alpha_a,
sr_, sr_,
1 if if_f0_ == i18n("") else 0, if_f0_,
info__, info__,
name_to_save0, name_to_save0,
version_2, version_2,

View File

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