Skip to content

Commit

Permalink
update gradio more easy 4
Browse files Browse the repository at this point in the history
  • Loading branch information
lpscr committed Oct 24, 2024
1 parent 9ab4e85 commit 2dc3f8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions finetune-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main():
model_cls = DiT
model_cfg = dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)
if args.finetune:
if args.pretrain == "":
if args.pretrain is None:
ckpt_path = str(cached_path("hf://SWivid/F5-TTS/F5TTS_Base/model_1200000.pt"))
else:
ckpt_path = args.pretrain
Expand All @@ -77,7 +77,7 @@ def main():
model_cls = UNetT
model_cfg = dict(dim=1024, depth=24, heads=16, ff_mult=4)
if args.finetune:
if args.pretrain == "":
if args.pretrain is None:
ckpt_path = str(cached_path("hf://SWivid/E2-TTS/E2TTS_Base/model_1200000.pt"))
else:
ckpt_path = args.pretrain
Expand Down
2 changes: 2 additions & 0 deletions finetune_gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def start_training(
yield "start train", gr.update(interactive=False), gr.update(interactive=False)

# Command to run the training script with the specified arguments
dataset_name = dataset_name.replace("_pinyin", "").replace("_char", "")
cmd = (
f"accelerate launch finetune-cli.py --exp_name {exp_name} "
f"--learning_rate {learning_rate} "
Expand Down Expand Up @@ -792,6 +793,7 @@ def check_finetune(finetune):
def get_checkpoints_project(project_name, is_gradio=True):
if project_name is None:
return [], ""
project_name = project_name.replace("_pinyin", "").replace("_char", "")
path_project_ckpts = os.path.join("ckpts", project_name)

if os.path.isdir(path_project_ckpts):
Expand Down

0 comments on commit 2dc3f8d

Please sign in to comment.