Skip to content

Commit

Permalink
change order tab add note in vocab check tab
Browse files Browse the repository at this point in the history
  • Loading branch information
lpscr committed Oct 26, 2024
1 parent 6d34650 commit ee91960
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/f5_tts/train/finetune_gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,14 @@ def get_combined_stats():
fn=get_random_sample_prepare, inputs=[cm_project], outputs=[random_text_prepare, random_audio_prepare]
)

with gr.TabItem("vocab check"):
gr.Markdown("""```plaintext
check the vocabulary for fine-tuning Emilia_ZH_EN to ensure all symbols are included. for finetune new language
```""")
check_button = gr.Button("check vocab")
txt_info_check = gr.Text(label="info", value="")
check_button.click(fn=vocab_check, inputs=[cm_project], outputs=[txt_info_check])

with gr.TabItem("train Data"):
gr.Markdown("""```plaintext
The auto-setting is still experimental. Please make sure that the epochs , save per updates , and last per steps are set correctly, or change them manually as needed.
Expand Down Expand Up @@ -1142,23 +1150,6 @@ def get_combined_stats():
check_finetune, inputs=[ch_finetune], outputs=[file_checkpoint_train, tokenizer_file, tokenizer_type]
)

with gr.TabItem("reduse checkpoint"):
txt_path_checkpoint = gr.Text(label="path checkpoint :")
txt_path_checkpoint_small = gr.Text(label="path output :")
ch_safetensors = gr.Checkbox(label="safetensors", value="")
txt_info_reduse = gr.Text(label="info", value="")
reduse_button = gr.Button("reduse")
reduse_button.click(
fn=extract_and_save_ema_model,
inputs=[txt_path_checkpoint, txt_path_checkpoint_small, ch_safetensors],
outputs=[txt_info_reduse],
)

with gr.TabItem("vocab check"):
check_button = gr.Button("check vocab")
txt_info_check = gr.Text(label="info", value="")
check_button.click(fn=vocab_check, inputs=[cm_project], outputs=[txt_info_check])

with gr.TabItem("test model"):
exp_name = gr.Radio(label="Model", choices=["F5-TTS", "E2-TTS"], value="F5-TTS")
list_checkpoints, checkpoint_select = get_checkpoints_project(projects_selelect, False)
Expand Down Expand Up @@ -1195,6 +1186,18 @@ def get_combined_stats():
bt_checkpoint_refresh.click(fn=get_checkpoints_project, inputs=[cm_project], outputs=[cm_checkpoint])
cm_project.change(fn=get_checkpoints_project, inputs=[cm_project], outputs=[cm_checkpoint])

with gr.TabItem("reduse checkpoint"):
txt_path_checkpoint = gr.Text(label="path checkpoint :")
txt_path_checkpoint_small = gr.Text(label="path output :")
ch_safetensors = gr.Checkbox(label="safetensors", value="")
txt_info_reduse = gr.Text(label="info", value="")
reduse_button = gr.Button("reduse")
reduse_button.click(
fn=extract_and_save_ema_model,
inputs=[txt_path_checkpoint, txt_path_checkpoint_small, ch_safetensors],
outputs=[txt_info_reduse],
)

with gr.TabItem("system info"):
output_box = gr.Textbox(label="GPU and CPU Information", lines=20)

Expand Down

0 comments on commit ee91960

Please sign in to comment.