mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-10 04:50:26 +08:00
chore(format): run black on dev (#2099)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ab07a8b1bc
commit
c38088dc6e
@@ -43,7 +43,8 @@ def save_small_model(ckpt, sr, if_f0, name, epoch, version, hps):
|
||||
opt["info"] = "%sepoch" % epoch
|
||||
opt["name"] = name
|
||||
opt["timestamp"] = int(time())
|
||||
if hps.author: opt["author"] = hps.author
|
||||
if hps.author:
|
||||
opt["author"] = hps.author
|
||||
opt["sr"] = sr
|
||||
opt["f0"] = if_f0
|
||||
opt["version"] = version
|
||||
@@ -179,7 +180,8 @@ def extract_small_model(path, name, author, sr, if_f0, info, version):
|
||||
opt["info"] = info
|
||||
opt["name"] = name
|
||||
opt["timestamp"] = int(time())
|
||||
if author: opt["author"] = author
|
||||
if author:
|
||||
opt["author"] = author
|
||||
opt["version"] = version
|
||||
opt["sr"] = sr
|
||||
opt["f0"] = int(if_f0)
|
||||
@@ -216,12 +218,15 @@ def merge(path1, path2, alpha1, sr, f0, info, name, version):
|
||||
continue
|
||||
opt["weight"][key] = a[key]
|
||||
return opt
|
||||
|
||||
|
||||
def authors(c1, c2):
|
||||
a1, a2 = c1.get("author", ""), c2.get("author", "")
|
||||
if a1 == a2: return a1
|
||||
if not a1: a1 = "Unknown"
|
||||
if not a2: a2 = "Unknown"
|
||||
if a1 == a2:
|
||||
return a1
|
||||
if not a1:
|
||||
a1 = "Unknown"
|
||||
if not a2:
|
||||
a2 = "Unknown"
|
||||
return f"{a1} & {a2}"
|
||||
|
||||
ckpt1 = torch.load(path1, map_location="cpu")
|
||||
@@ -260,7 +265,8 @@ def merge(path1, path2, alpha1, sr, f0, info, name, version):
|
||||
"""
|
||||
opt["name"] = name
|
||||
opt["timestamp"] = int(time())
|
||||
if author: opt["author"] = author
|
||||
if author:
|
||||
opt["author"] = author
|
||||
opt["sr"] = sr
|
||||
opt["f0"] = 1 if f0 == i18n("是") else 0
|
||||
opt["version"] = version
|
||||
|
||||
Reference in New Issue
Block a user