Skip to content

Commit d9c5b55

Browse files
committed
ui update
updated ui to have placeholders, certain sliders appear only when needed(e.g. crepe hop-length, save-freq), step 2b in training is hidden if pitch guidance is disabled, unnecessary radios for picking between two options replaced with checkboxes for more clean look.
1 parent 6439013 commit d9c5b55

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

infer-web.py

+12-8
Original file line numberDiff line numberDiff line change
@@ -1155,9 +1155,9 @@ def train_index(exp_dir1, version19):
11551155
# infos.append("成功构建索引,added_IVF%s_Flat_FastScan_%s.index"%(n_ivf,version19))
11561156
yield "\n".join(infos)
11571157

1158-
def setBoolean(status):
1159-
status = not status
1160-
return status
1158+
#def setBoolean(status): #true to false and vice versa / not implemented yet, dont touch!!!!!!!
1159+
# status = not status
1160+
# return status
11611161

11621162
# but5.click(train1key, [exp_dir1, sr2, if_f0_3, trainset_dir4, spk_id5, gpus6, np7, f0method8, save_epoch10, total_epoch11, batch_size12, if_save_latest13, pretrained_G14, pretrained_D15, gpus16, if_cache_gpu17], info3)
11631163
def train1key(
@@ -1811,6 +1811,9 @@ def get_presets():
18111811

18121812
return preset_names
18131813

1814+
def stepdisplay(if_save_every_weights):
1815+
return ({"visible": if_save_every_weights, "__type__": "update"})
1816+
18141817
def match_index(sid0):
18151818
picked = False
18161819
#folder = sid0.split('.')[0]
@@ -2405,6 +2408,7 @@ def whethercrepeornah(radio):
24052408
label=i18n("保存频率save_every_epoch"),
24062409
value=5,
24072410
interactive=True,
2411+
visible=True,
24082412
)
24092413
total_epoch11 = gr.Slider(
24102414
minimum=1,
@@ -2423,20 +2427,18 @@ def whethercrepeornah(radio):
24232427
interactive=True,
24242428
)
24252429
if_save_latest13 = gr.Checkbox(
2426-
label=i18n("是否仅保存最新的ckpt文件以节省硬盘空间"),
2430+
label="Whether to save only the latest .ckpt file to save hard disk space",
24272431

24282432
value=True,
24292433
interactive=True,
24302434
)
24312435
if_cache_gpu17 = gr.Checkbox(
2432-
label=i18n(
2433-
"是否缓存所有训练集至显存. 10min以下小数据可缓存以加速训练, 大数据缓存会炸显存也加不了多少速"
2434-
),
2436+
label="Cache all training sets to GPU memory. Caching small datasets (less than 10 minutes) can speed up training, but caching large datasets will consume a lot of GPU memory and may not provide much speed improvement",
24352437
value=False,
24362438
interactive=True,
24372439
)
24382440
if_save_every_weights18 = gr.Checkbox(
2439-
label=i18n("是否在每次保存时间点将最终小模型保存至weights文件夹"),
2441+
label="Save a small final model to the 'weights' folder at each save point",
24402442
value=True,
24412443
interactive=True,
24422444
)
@@ -2489,6 +2491,8 @@ def whethercrepeornah(radio):
24892491
#but5 = gr.Button(i18n("一键训练"), variant="primary")
24902492
info3 = gr.Textbox(label=i18n("输出信息"), value="", max_lines=10)
24912493

2494+
if_save_every_weights18.change(fn=stepdisplay, inputs=[if_save_every_weights18], outputs=[save_epoch10])
2495+
24922496
but3.click(
24932497
click_train,
24942498
[

0 commit comments

Comments
 (0)