mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +08:00
chore(format): run black on dev (#2104)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
b3215d126c
commit
ea6c846651
@ -1536,9 +1536,7 @@ with gr.Blocks(title="RVC WebUI") as app:
|
|||||||
)
|
)
|
||||||
with gr.Row():
|
with gr.Row():
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
ckpt_path1 = gr.File(
|
ckpt_path1 = gr.File(label=i18n("模型路径"))
|
||||||
label=i18n("模型路径")
|
|
||||||
)
|
|
||||||
but8 = gr.Button(i18n("查看"), variant="primary")
|
but8 = gr.Button(i18n("查看"), variant="primary")
|
||||||
with gr.Column():
|
with gr.Column():
|
||||||
info6 = gr.Textbox(label=i18n("输出信息"), value="")
|
info6 = gr.Textbox(label=i18n("输出信息"), value="")
|
||||||
|
@ -47,6 +47,7 @@ def original_audio_time_minus():
|
|||||||
def original_audio_freq_minus():
|
def original_audio_freq_minus():
|
||||||
return original_audio_storage()["f"]
|
return original_audio_storage()["f"]
|
||||||
|
|
||||||
|
|
||||||
@singleton_variable
|
@singleton_variable
|
||||||
def original_rmvpe_f0():
|
def original_rmvpe_f0():
|
||||||
x = original_audio_storage()
|
x = original_audio_storage()
|
||||||
|
@ -25,13 +25,27 @@ def show_model_info(cpt, show_long_id=False):
|
|||||||
+ ")"
|
+ ")"
|
||||||
)
|
)
|
||||||
sim = hash_similarity(h, hread)
|
sim = hash_similarity(h, hread)
|
||||||
if not isinstance(sim, str): sim = "%.2f%%" % (sim*100)
|
if not isinstance(sim, str):
|
||||||
|
sim = "%.2f%%" % (sim * 100)
|
||||||
if not show_long_id:
|
if not show_long_id:
|
||||||
h = i18n("不显示")
|
h = i18n("不显示")
|
||||||
if h != hread:
|
if h != hread:
|
||||||
h = i18n("相似度") + " " + sim + " -> " + h
|
h = i18n("相似度") + " " + sim + " -> " + h
|
||||||
elif h != hread:
|
elif h != hread:
|
||||||
h = i18n("相似度") + " " + sim + " -> " + h + "(" + i18n("实际计算") + "), " + hread + "(" + i18n("从模型中读取") + ")"
|
h = (
|
||||||
|
i18n("相似度")
|
||||||
|
+ " "
|
||||||
|
+ sim
|
||||||
|
+ " -> "
|
||||||
|
+ h
|
||||||
|
+ "("
|
||||||
|
+ i18n("实际计算")
|
||||||
|
+ "), "
|
||||||
|
+ hread
|
||||||
|
+ "("
|
||||||
|
+ i18n("从模型中读取")
|
||||||
|
+ ")"
|
||||||
|
)
|
||||||
txt = f"""{i18n("模型名")}: %s
|
txt = f"""{i18n("模型名")}: %s
|
||||||
{i18n("封装时间")}: %s
|
{i18n("封装时间")}: %s
|
||||||
{i18n("模型作者")}: %s
|
{i18n("模型作者")}: %s
|
||||||
@ -59,7 +73,8 @@ def show_model_info(cpt, show_long_id=False):
|
|||||||
|
|
||||||
def show_info(path):
|
def show_info(path):
|
||||||
try:
|
try:
|
||||||
if hasattr(path, "name"): path = path.name
|
if hasattr(path, "name"):
|
||||||
|
path = path.name
|
||||||
a = torch.load(path, map_location="cpu")
|
a = torch.load(path, map_location="cpu")
|
||||||
txt = show_model_info(a, show_long_id=True)
|
txt = show_model_info(a, show_long_id=True)
|
||||||
del a
|
del a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user