Skip to content

Commit

Permalink
Fix Temporally
Browse files Browse the repository at this point in the history
  • Loading branch information
DeiantV committed Aug 19, 2023
1 parent 293c5f2 commit 4b28149
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 138 deletions.
6 changes: 3 additions & 3 deletions easy_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,11 +486,11 @@ def load_downloaded_backup(url):
for filename in os.listdir(zips_path):
if filename.endswith(".zip"):
zipfile_path = os.path.join(zips_path,filename)
# zip_dir_name = os.path.splitext(filename)[0]
# unzip_dir = os.path.join(parent_path,'logs')
zip_dir_name = os.path.splitext(filename)[0]
unzip_dir = os.path.join(parent_path,'logs', zip_dir_name)
print(i18n("继续提取..."))
infos.append(i18n("继续提取..."))
shutil.unpack_archive(zipfile_path, unzips_path, 'zip')
shutil.unpack_archive(zipfile_path, unzip_dir, 'zip')
yield "\n".join(infos)
else:
print(i18n("解压缩出错。"))
Expand Down
2 changes: 1 addition & 1 deletion i18n/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"训练模型": "Entrenar Modelo",
"训练特征索引": "Índice de características del Entrenamiento",
"一键训练": "Formación con un solo clic. (No funciona)",
"ckpt处理": "Procesamiento de recibos",
"ckpt处理": "Procesamiento de ckpt",
"模型融合, 可用于测试音色融合": "Fusión de modelos, se puede utilizar para fusionar diferentes voces",
"A模型路径": "Modelo A ruta.",
"B模型路径": "Modelo B ruta.",
Expand Down
268 changes: 134 additions & 134 deletions infer-web.py
Original file line number Diff line number Diff line change
Expand Up @@ -2209,140 +2209,140 @@ def toggle_advanced_settings_batch(checkbox):
],
[vc_output4],
)
# with gr.TabItem(i18n("ckpt处理")):
# with gr.Group():
# gr.Markdown(value=i18n("模型融合, 可用于测试音色融合"))
# with gr.Row():
# ckpt_a = gr.Textbox(label=i18n("A模型路径"), value="", interactive=True, placeholder="Path to your model A.")
# ckpt_b = gr.Textbox(label=i18n("B模型路径"), value="", interactive=True, placeholder="Path to your model B.")
# alpha_a = gr.Slider(
# minimum=0,
# maximum=1,
# label=i18n("A模型权重"),
# value=0.5,
# interactive=True,
# )
# with gr.Row():
# sr_ = gr.Radio(
# label=i18n("目标采样率"),
# choices=["40k", "48k"],
# value="40k",
# interactive=True,
# )
# if_f0_ = gr.Checkbox(
# label=i18n("模型是否具有俯仰引导功能"),
# value=True,
# interactive=True,
# )
# info__ = gr.Textbox(
# label=i18n("要置入的模型信息"), value="", max_lines=8, interactive=True, placeholder="Model information to be placed."
# )
# name_to_save0 = gr.Textbox(
# label=i18n("保存的模型名不带后缀"),
# value="",
# placeholder="Name for saving.",
# max_lines=1,
# interactive=True,
# )
# version_2 = gr.Radio(
# label=i18n("模型版本型号"),
# choices=["v1", "v2"],
# value="v1",
# interactive=True,
# )
# with gr.Row():
# but6 = gr.Button(i18n("融合"), variant="primary")
# info4 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
# but6.click(
# merge,
# [
# ckpt_a,
# ckpt_b,
# alpha_a,
# sr_,
# if_f0_,
# info__,
# name_to_save0,
# version_2,
# ],
# info4,
# ) # def merge(path1,path2,alpha1,sr,f0,info):
# with gr.Group():
# gr.Markdown(value=i18n("修改模型信息(仅支持weights文件夹下提取的小模型文件)"))
# with gr.Row(): ######
# ckpt_path0 = gr.Textbox(
# label=i18n("模型路径"), placeholder="Path to your Model.", value="", interactive=True
# )
# info_ = gr.Textbox(
# label=i18n("要改的模型信息"), value="", max_lines=8, interactive=True, placeholder="Model information to be changed."
# )
# name_to_save1 = gr.Textbox(
# label=i18n("保存的文件名, 默认空为和源文件同名"),
# placeholder="Either leave empty or put in the Name of the Model to be saved.",
# value="",
# max_lines=8,
# interactive=True,
# )
# with gr.Row():
# but7 = gr.Button(i18n("修改"), variant="primary")
# info5 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
# but7.click(change_info, [ckpt_path0, info_, name_to_save1], info5)
# with gr.Group():
# gr.Markdown(value=i18n("查看模型信息(仅支持weights文件夹下提取的小模型文件)"))
# with gr.Row():
# ckpt_path1 = gr.Textbox(
# label=i18n("模型路径"), value="", interactive=True, placeholder="Model path here."
# )
# but8 = gr.Button(i18n("查看"), variant="primary")
# info6 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
# but8.click(show_info, [ckpt_path1], info6)
# with gr.Group():
# gr.Markdown(
# value=i18n(
# "模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况"
# )
# )
# with gr.Row():
# ckpt_path2 = gr.Textbox(
# lines=3,
# label=i18n("模型路径"),
# value=os.path.join(now_dir, "logs", "[YOUR_MODEL]", "G_23333.pth"),
# interactive=True,
# )
# save_name = gr.Textbox(
# label=i18n("保存名"), value="", interactive=True,
# placeholder="Your filename here.",
# )
# sr__ = gr.Radio(
# label=i18n("目标采样率"),
# choices=["32k", "40k", "48k"],
# value="40k",
# interactive=True,
# )
# if_f0__ = gr.Checkbox(
# label=i18n("模型是否具有俯仰引导功能"),
# value=True,
# interactive=True,
# )
# version_1 = gr.Radio(
# label=i18n("模型版本型号"),
# choices=["v1", "v2"],
# value="v2",
# interactive=True,
# )
# info___ = gr.Textbox(
# label=i18n("要置入的模型信息"), value="", max_lines=8, interactive=True, placeholder="Model info here."
# )
# but9 = gr.Button(i18n("提取"), variant="primary")
# info7 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
# ckpt_path2.change(
# change_info_, [ckpt_path2], [sr__, if_f0__, version_1]
# )
# but9.click(
# extract_small_model,
# [ckpt_path2, save_name, sr__, if_f0__, info___, version_1],
# info7,
# )
with gr.TabItem(i18n("ckpt处理")):
with gr.Group():
gr.Markdown(value=i18n("模型融合, 可用于测试音色融合"))
with gr.Row():
ckpt_a = gr.Textbox(label=i18n("A模型路径"), value="", interactive=True, placeholder="Path to your model A.")
ckpt_b = gr.Textbox(label=i18n("B模型路径"), value="", interactive=True, placeholder="Path to your model B.")
alpha_a = gr.Slider(
minimum=0,
maximum=1,
label=i18n("A模型权重"),
value=0.5,
interactive=True,
)
with gr.Row():
sr_ = gr.Radio(
label=i18n("目标采样率"),
choices=["40k", "48k"],
value="40k",
interactive=True,
)
if_f0_ = gr.Checkbox(
label="Whether the model has pitch guidance.",
value=True,
interactive=True,
)
info__ = gr.Textbox(
label=i18n("要置入的模型信息"), value="", max_lines=8, interactive=True, placeholder="Model information to be placed."
)
name_to_save0 = gr.Textbox(
label=i18n("保存的模型名不带后缀"),
value="",
placeholder="Name for saving.",
max_lines=1,
interactive=True,
)
version_2 = gr.Radio(
label=i18n("模型版本型号"),
choices=["v1", "v2"],
value="v1",
interactive=True,
)
with gr.Row():
but6 = gr.Button(i18n("融合"), variant="primary")
info4 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
but6.click(
merge,
[
ckpt_a,
ckpt_b,
alpha_a,
sr_,
if_f0_,
info__,
name_to_save0,
version_2,
],
info4,
) # def merge(path1,path2,alpha1,sr,f0,info):
with gr.Group():
gr.Markdown(value=i18n("修改模型信息(仅支持weights文件夹下提取的小模型文件)"))
with gr.Row(): ######
ckpt_path0 = gr.Textbox(
label=i18n("模型路径"), placeholder="Path to your Model.", value="", interactive=True
)
info_ = gr.Textbox(
label=i18n("要改的模型信息"), value="", max_lines=8, interactive=True, placeholder="Model information to be changed."
)
name_to_save1 = gr.Textbox(
label=i18n("保存的文件名, 默认空为和源文件同名"),
placeholder="Either leave empty or put in the Name of the Model to be saved.",
value="",
max_lines=8,
interactive=True,
)
with gr.Row():
but7 = gr.Button(i18n("修改"), variant="primary")
info5 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
but7.click(change_info, [ckpt_path0, info_, name_to_save1], info5)
with gr.Group():
gr.Markdown(value=i18n("查看模型信息(仅支持weights文件夹下提取的小模型文件)"))
with gr.Row():
ckpt_path1 = gr.Textbox(
label=i18n("模型路径"), value="", interactive=True, placeholder="Model path here."
)
but8 = gr.Button(i18n("查看"), variant="primary")
info6 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
but8.click(show_info, [ckpt_path1], info6)
with gr.Group():
gr.Markdown(
value=i18n(
"模型提取(输入logs文件夹下大文件模型路径),适用于训一半不想训了模型没有自动提取保存小文件模型,或者想测试中间模型的情况"
)
)
with gr.Row():
ckpt_path2 = gr.Textbox(
lines=3,
label=i18n("模型路径"),
value=os.path.join(now_dir, "logs", "[YOUR_MODEL]", "G_23333.pth"),
interactive=True,
)
save_name = gr.Textbox(
label=i18n("保存名"), value="", interactive=True,
placeholder="Your filename here.",
)
sr__ = gr.Radio(
label=i18n("目标采样率"),
choices=["32k", "40k", "48k"],
value="40k",
interactive=True,
)
if_f0__ = gr.Checkbox(
label="Whether the model has pitch guidance.",
value=True,
interactive=True,
)
version_1 = gr.Radio(
label=i18n("模型版本型号"),
choices=["v1", "v2"],
value="v2",
interactive=True,
)
info___ = gr.Textbox(
label=i18n("要置入的模型信息"), value="", max_lines=8, interactive=True, placeholder="Model info here."
)
but9 = gr.Button(i18n("提取"), variant="primary")
info7 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=8)
ckpt_path2.change(
change_info_, [ckpt_path2], [sr__, if_f0__, version_1]
)
but9.click(
extract_small_model,
[ckpt_path2, save_name, sr__, if_f0__, info___, version_1],
info7,
)

# with gr.TabItem(i18n("Onnx导出")):
# with gr.Row():
Expand Down

0 comments on commit 4b28149

Please sign in to comment.