From e5374b20415da0ac52a64077b426f5756cd6f23b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 17 May 2023 23:17:01 +0800 Subject: [PATCH] Revert "fix: merge f0 option value (#298)" (#303) This reverts commit da0b599fa74d9094fdd0dd6c965a3df363b47ce8. --- infer-web.py | 2 +- train/process_ckpt.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infer-web.py b/infer-web.py index beb8b9c..df2f9a4 100644 --- a/infer-web.py +++ b/infer-web.py @@ -1668,7 +1668,7 @@ with gr.Blocks() as app: ckpt_b, alpha_a, sr_, - 1 if if_f0_ == i18n("是") else 0, + if_f0_, info__, name_to_save0, version_2, diff --git a/train/process_ckpt.py b/train/process_ckpt.py index 888051a..9d3d7e9 100644 --- a/train/process_ckpt.py +++ b/train/process_ckpt.py @@ -194,7 +194,7 @@ def change_info(path, info, name): 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: 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] """ opt["sr"] = sr - opt["f0"] = if_f0 + opt["f0"] = 1 if f0 == "是" else 0 opt["version"] = version opt["info"] = info torch.save(opt, "weights/%s.pth" % name)