Checks
Environment Details
Hi, thank you so much for this amazing project!
I’m trying to fine-tune F5-TTS using the LJSpeech dataset, and I followed all the instructions and preprocessing steps from prepare_ljspeech.py.
🙏 If possible, could someone provide a minimal and clean example of how to launch training directly via CLI using a custom dataset like LJSpeech?
Just the minimum config/command combination to make it work properly with the char tokenizer, without relying on the dynamic vocab path logic.
That would be very helpful for understanding the correct override structure or config needed for simple use cases like mine.
Thanks a lot in advance! 🙌
OS & Container
Docker Image: ghcr.io/swivid/f5-tts:main
Base OS: Ubuntu (inside Docker)
Python
Python version: 3.11.9
Dependencies (installed via Docker image)
PyTorch: 2.2.1 (CUDA 12.x)
Transformers, Datasets, Accelerate, etc. — as included in the Docker image
Hardware
GPU: NVIDIA RTX (via nvidia-docker, with CUDA support)
Mixed precision: enabled (fp16 via accelerate)
Dataset
Dataset: LJSpeech-1.1
Processed to: /workspace/F5-TTS/data/LJSpeech_char
Command used to launch training
accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_LJSpeech.yaml
Steps to Reproduce
1. Clone the repo (inside Docker container)
git clone https://github.com/SWivid/F5-TTS.git
cd F5-TTS
2. Download and extract LJSpeech dataset
wget https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2
tar -xjf LJSpeech-1.1.tar.bz2
3. Preprocess dataset
python src/f5_tts/train/datasets/prepare_ljspeech.py
For LJSpeech_char, sample count: 13100
For LJSpeech_char, vocab size: 75
For LJSpeech_char, total 23.92 hours
```bash
# 4. Create custom config
cp src/f5_tts/configs/F5TTS_v1_Base.yaml src/f5_tts/configs/F5TTS_LJSpeech.yaml
Edited config (F5TTS_LJSpeech.yaml):
datasets:
name: LJSpeech_char
dataset_name: LJSpeech_char
dataset_dir: /workspace/F5-TTS/data/LJSpeech_char
tokenizer: char
vocab_path: /workspace/F5-TTS/data/LJSpeech_char/vocab.txt
batch_size_per_gpu: 38400
batch_size_type: frame
max_samples: 64
num_workers: 16
model:
name: F5TTS_v1_Base
tokenizer: char
# 5. Launch training
accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_LJSpeech.yaml
Observed error:
FileNotFoundError: No such file or directory: '/workspace/F5-TTS/F5-TTS/src/f5_tts/../../data/LJSpeech_char_char/vocab.txt'
Let me know if you'd like me to upload sample audio/text files or additional logs.
Everything was done inside Docker using ghcr.io/swivid/f5-tts:main.
✔️ Expected Behavior
When using a custom dataset configuration (for example, using LJSpeech with the "char" tokenizer), the training script should:
Load the dataset from the specified dataset_dir (e.g., /workspace/F5-TTS/data/LJSpeech_char).
Use the provided vocab_path (e.g., /workspace/F5-TTS/data/LJSpeech_char/vocab.txt) for building the tokenizer.
Not dynamically generate a vocabulary path by concatenating the dataset name with the tokenizer type (e.g., it should not look for /workspace/F5-TTS/F5-TTS/src/f5_tts/../../data/LJSpeech_char_char/vocab.txt).
Successfully start the fine-tuning process without encountering a FileNotFoundError.
In summary, the expected behavior is that the model uses the exact configuration parameters specified in the custom YAML file, ensuring that the correct vocabulary file is loaded and training proceeds normally.
❌ Actual Behavior
root@f876255569f3:/workspace/F5-TTS/F5-TTS# accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_LJSpeech.yaml
Error executing job with overrides: []
Traceback (most recent call last):
File "/workspace/F5-TTS/F5-TTS/src/f5_tts/train/train.py", line 31, in main
vocab_char_map, vocab_size = get_tokenizer(tokenizer_path, tokenizer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/F5-TTS/F5-TTS/src/f5_tts/model/utils.py", line 113, in get_tokenizer
with open(tokenizer_path, "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/F5-TTS/F5-TTS/src/f5_tts/../../data/LJSpeech_char_char/vocab.txt'
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Traceback (most recent call last):
File "/opt/conda/bin/accelerate", line 8, in
sys.exit(main())
^^^^^^
File "/opt/conda/lib/python3.11/site-packages/accelerate/commands/accelerate_cli.py", line 48, in main
args.func(args)
File "/opt/conda/lib/python3.11/site-packages/accelerate/commands/launch.py", line 1194, in launch_command
simple_launcher(args)
File "/opt/conda/lib/python3.11/site-packages/accelerate/commands/launch.py", line 780, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', 'src/f5_tts/train/train.py', '--config-name', 'F5TTS_LJSpeech.yaml']' returned non-zero exit status 1.
root@f876255569f3:/workspace/F5-TTS/F5-TTS#
Checks
Environment Details
Hi, thank you so much for this amazing project!
I’m trying to fine-tune F5-TTS using the LJSpeech dataset, and I followed all the instructions and preprocessing steps from
prepare_ljspeech.py.🙏 If possible, could someone provide a minimal and clean example of how to launch training directly via CLI using a custom dataset like LJSpeech?
Just the minimum config/command combination to make it work properly with the
chartokenizer, without relying on the dynamic vocab path logic.That would be very helpful for understanding the correct override structure or config needed for simple use cases like mine.
Thanks a lot in advance! 🙌
OS & Container
Docker Image: ghcr.io/swivid/f5-tts:main
Base OS: Ubuntu (inside Docker)
Python
Python version: 3.11.9
Dependencies (installed via Docker image)
PyTorch: 2.2.1 (CUDA 12.x)
Transformers, Datasets, Accelerate, etc. — as included in the Docker image
Hardware
GPU: NVIDIA RTX (via nvidia-docker, with CUDA support)
Mixed precision: enabled (fp16 via accelerate)
Dataset
Dataset: LJSpeech-1.1
Processed to: /workspace/F5-TTS/data/LJSpeech_char
Command used to launch training
accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_LJSpeech.yaml
Steps to Reproduce
1. Clone the repo (inside Docker container)
git clone https://github.com/SWivid/F5-TTS.git
cd F5-TTS
2. Download and extract LJSpeech dataset
wget https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2
tar -xjf LJSpeech-1.1.tar.bz2
3. Preprocess dataset
python src/f5_tts/train/datasets/prepare_ljspeech.py
For LJSpeech_char, sample count: 13100
For LJSpeech_char, vocab size: 75
For LJSpeech_char, total 23.92 hours
Edited config (
F5TTS_LJSpeech.yaml):# 5. Launch training accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_LJSpeech.yamlObserved error:
Let me know if you'd like me to upload sample audio/text files or additional logs.
Everything was done inside Docker using
ghcr.io/swivid/f5-tts:main.✔️ Expected Behavior
When using a custom dataset configuration (for example, using LJSpeech with the "char" tokenizer), the training script should:
In summary, the expected behavior is that the model uses the exact configuration parameters specified in the custom YAML file, ensuring that the correct vocabulary file is loaded and training proceeds normally.
❌ Actual Behavior
root@f876255569f3:/workspace/F5-TTS/F5-TTS# accelerate launch --mixed_precision=fp16 src/f5_tts/train/train.py --config-name F5TTS_LJSpeech.yaml
Error executing job with overrides: []
Traceback (most recent call last):
File "/workspace/F5-TTS/F5-TTS/src/f5_tts/train/train.py", line 31, in main
vocab_char_map, vocab_size = get_tokenizer(tokenizer_path, tokenizer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/F5-TTS/F5-TTS/src/f5_tts/model/utils.py", line 113, in get_tokenizer
with open(tokenizer_path, "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/F5-TTS/F5-TTS/src/f5_tts/../../data/LJSpeech_char_char/vocab.txt'
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Traceback (most recent call last):
File "/opt/conda/bin/accelerate", line 8, in
sys.exit(main())
^^^^^^
File "/opt/conda/lib/python3.11/site-packages/accelerate/commands/accelerate_cli.py", line 48, in main
args.func(args)
File "/opt/conda/lib/python3.11/site-packages/accelerate/commands/launch.py", line 1194, in launch_command
simple_launcher(args)
File "/opt/conda/lib/python3.11/site-packages/accelerate/commands/launch.py", line 780, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', 'src/f5_tts/train/train.py', '--config-name', 'F5TTS_LJSpeech.yaml']' returned non-zero exit status 1.
root@f876255569f3:/workspace/F5-TTS/F5-TTS#