mrfakename commited on
Commit
faf2525
1 Parent(s): 831ba2e

Sync from GitHub repo

Browse files

This Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there

Files changed (1) hide show
  1. finetune_gradio.py +3 -2
finetune_gradio.py CHANGED
@@ -254,6 +254,7 @@ def start_training(
254
  del tts_api
255
  gc.collect()
256
  torch.cuda.empty_cache()
 
257
 
258
  path_project = os.path.join(path_data, dataset_name + "_pinyin")
259
 
@@ -698,7 +699,7 @@ def get_random_sample_infer(project_name):
698
  )
699
 
700
 
701
- def infer(project_name, file_checkpoint, exp_name, ref_text, ref_audio, gen_text, nfe_step):
702
  global last_checkpoint, last_device, tts_api
703
 
704
  if not os.path.isfile(file_checkpoint):
@@ -917,7 +918,7 @@ with gr.Blocks() as app:
917
 
918
  check_button_infer.click(
919
  fn=infer,
920
- inputs=[project_name, file_checkpoint_pt, exp_name, ref_text, ref_audio, gen_text, nfe_step],
921
  outputs=[gen_audio],
922
  )
923
 
 
254
  del tts_api
255
  gc.collect()
256
  torch.cuda.empty_cache()
257
+ tts_api = None
258
 
259
  path_project = os.path.join(path_data, dataset_name + "_pinyin")
260
 
 
699
  )
700
 
701
 
702
+ def infer(file_checkpoint, exp_name, ref_text, ref_audio, gen_text, nfe_step):
703
  global last_checkpoint, last_device, tts_api
704
 
705
  if not os.path.isfile(file_checkpoint):
 
918
 
919
  check_button_infer.click(
920
  fn=infer,
921
+ inputs=[file_checkpoint_pt, exp_name, ref_text, ref_audio, gen_text, nfe_step],
922
  outputs=[gen_audio],
923
  )
924