Update process_ckpt.py

This commit is contained in:
RVC-Boss 2023-05-17 15:39:24 +00:00 committed by GitHub
parent e5374b2041
commit 6fb1f8c1b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 255 additions and 252 deletions

View File

@ -1,6 +1,9 @@
import torch, traceback, os, pdb
import torch, traceback, os, pdb,sys
now_dir = os.getcwd()
sys.path.append(now_dir)
from collections import OrderedDict
from i18n import I18nAuto
i18n = I18nAuto()
def savee(ckpt, sr, if_f0, name, epoch, version):
try:
@ -243,7 +246,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"] = 1 if f0 == i18n("") else 0
opt["version"] = version
opt["info"] = info
torch.save(opt, "weights/%s.pth" % name)