ComfyUI custom nodes for T5Gemma-TTS, a multilingual text-to-speech model with voice cloning and duration control, based on the T5Gemma encoder-decoder LLM architecture.
AUDIO type, compatible with built-in SaveAudio and PreviewAudio nodesLoads the model and tokenizers from a HuggingFace repo ID or local path.
| Parameter | Default | Description |
|---|---|---|
model_dir | Aratako/T5Gemma-TTS-2b-2b | HF repo ID or local path |
device | auto | auto, cuda, or cpu |
xcodec2_model_name | (blank) | Override XCodec2 model name |
use_torch_compile | False | Enable torch.compile (CUDA only) |
cpu_codec | False | Run XCodec2 on CPU (saves ~3.5 GB VRAM) |
cpu_whisper | False | Run Whisper on CPU (saves ~5 GB VRAM) |
Generates speech audio from text.
| Parameter | Default | Description |
|---|---|---|
model | — | Model from the loader node |
target_text | — | Text to synthesize |
top_k | 30 | Top-k sampling |
top_p | 0.9 | Nucleus sampling |
temperature | 0.8 | Sampling temperature |
seed | 1 | Random seed |
reference_audio | (optional) | Reference audio for voice cloning |
reference_text | (optional) | Transcript of reference (auto-transcribed if blank) |
target_duration | 0.0 | Duration in seconds (0 = auto) |
language | auto | auto, en, ja, zh |
Loads a reference audio file from disk for voice cloning.
| Parameter | Description |
|---|---|
audio_path | Path to a WAV/FLAC/MP3 file |
Clone or copy this folder into your ComfyUI custom_nodes/ directory.
Install dependencies:
cd ComfyUI/custom_nodes/comfyui-t5gemma-tts
pip install -r requirements.txt
# Anime-XCodec2 variant (44.1 kHz, recommended for Japanese voices)
pip install https://huggingface.co/NandemoGHS/Anime-XCodec2-44.1kHz-v2/resolve/main/xcodec2-0.1.7.tar.gz
# OR original XCodec2 (16 kHz, recommended for English/Chinese)
# pip install xcodec2==0.1.5 --no-deps
pip install pyopenjtalk-plus[onnxruntime]
[T5Gemma-TTS Model Loader] → model
↓
[T5Gemma-TTS Generate] → AUDIO → [Save Audio]
↑ (optional)
[Load Audio / T5Gemma-TTS Reference Audio] → reference_audio
model_dir to Aratako/T5Gemma-TTS-2b-2breference_audio input of the Generate nodereference_text (otherwise Whisper will auto-transcribe)| Model | Approx. VRAM |
|---|---|
T5Gemma-TTS-2b-2b | ~10.6 GB |
T5Gemma-TTS-2b-2b-encoder-8bit | ~8.6 GB |
T5Gemma-TTS-2b-2b-encoder-4bit | ~7.6 GB |
Use cpu_codec and/or cpu_whisper to reduce VRAM usage further.
MIT
1 commits
Python
100.0%
ComfyUI custom nodes for T5Gemma-TTS, a multilingual text-to-speech model with voice cloning and duration control, based on the T5Gemma encoder-decoder LLM architecture.
AUDIO type, compatible with built-in SaveAudio and PreviewAudio nodesLoads the model and tokenizers from a HuggingFace repo ID or local path.
| Parameter | Default | Description |
|---|---|---|
model_dir | Aratako/T5Gemma-TTS-2b-2b | HF repo ID or local path |
device | auto | auto, cuda, or cpu |
xcodec2_model_name | (blank) | Override XCodec2 model name |
use_torch_compile | False | Enable torch.compile (CUDA only) |
cpu_codec | False | Run XCodec2 on CPU (saves ~3.5 GB VRAM) |
cpu_whisper | False | Run Whisper on CPU (saves ~5 GB VRAM) |
Generates speech audio from text.
| Parameter | Default | Description |
|---|---|---|
model | — | Model from the loader node |
target_text | — | Text to synthesize |
top_k | 30 | Top-k sampling |
top_p | 0.9 | Nucleus sampling |
temperature | 0.8 | Sampling temperature |
seed | 1 | Random seed |
reference_audio | (optional) | Reference audio for voice cloning |
reference_text | (optional) | Transcript of reference (auto-transcribed if blank) |
target_duration | 0.0 | Duration in seconds (0 = auto) |
language | auto | auto, en, ja, zh |
Loads a reference audio file from disk for voice cloning.
| Parameter | Description |
|---|---|
audio_path | Path to a WAV/FLAC/MP3 file |
Clone or copy this folder into your ComfyUI custom_nodes/ directory.
Install dependencies:
cd ComfyUI/custom_nodes/comfyui-t5gemma-tts
pip install -r requirements.txt
# Anime-XCodec2 variant (44.1 kHz, recommended for Japanese voices)
pip install https://huggingface.co/NandemoGHS/Anime-XCodec2-44.1kHz-v2/resolve/main/xcodec2-0.1.7.tar.gz
# OR original XCodec2 (16 kHz, recommended for English/Chinese)
# pip install xcodec2==0.1.5 --no-deps
pip install pyopenjtalk-plus[onnxruntime]
[T5Gemma-TTS Model Loader] → model
↓
[T5Gemma-TTS Generate] → AUDIO → [Save Audio]
↑ (optional)
[Load Audio / T5Gemma-TTS Reference Audio] → reference_audio
model_dir to Aratako/T5Gemma-TTS-2b-2breference_audio input of the Generate nodereference_text (otherwise Whisper will auto-transcribe)| Model | Approx. VRAM |
|---|---|
T5Gemma-TTS-2b-2b | ~10.6 GB |
T5Gemma-TTS-2b-2b-encoder-8bit | ~8.6 GB |
T5Gemma-TTS-2b-2b-encoder-4bit | ~7.6 GB |
Use cpu_codec and/or cpu_whisper to reduce VRAM usage further.
MIT
1 commits
Python
100.0%