English | 中文版
⚠️ CRITICAL: transformers Version Requirement
Qwen3-TTS works on transformers 4.57.3 and transformers >= 5 (v5.0+ compatibility is provided by
tools/transformers5_shim.py, applied automatically on import). On transformers < 5 the shims are no-ops, so the 4.57.3 path is unchanged:pip install transformers==4.57.3 # v4 path (shims inactive) # or pip install "transformers>=5.0" # v5 path (shims applied)

ComfyUI custom nodes for speech synthesis, voice cloning, and voice design, based on the open-source Qwen3-TTS project by the Alibaba Qwen team.
QwenTTSConfigNode due to voice inconsistency; fixed MPS precision bug & CustomVoice channel mismatch; code cleanup (update.md)extra_model_paths.yaml support (update.md)VoiceDesignNode)Generate unique voices based on text descriptions.
text: Target text to synthesize.instruct: Description of the voice (e.g., "A gentle female voice with a high pitch").model_choice: Currently locked to 1.7B for VoiceDesign features.attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.VoiceCloneNode)Clone a voice from a reference audio clip.
ref_audio: A short (5-15s) audio clip to clone.ref_text: Text spoken in the ref_audio (helps improve quality).target_text: The new text you want the cloned voice to say.model_choice: Choose between 0.6B (fast) or 1.7B (high quality).attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.CustomVoiceNode)Standard TTS using preset speakers.
text: Target text.speaker: Selection from preset voices (Aiden, Eric, Serena, etc.).instruct: Optional style instructions.attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.RoleBankNode) [New]Collect and manage multiple voice prompts for dialogue generation.
role_name_N: Name of the role (e.g., "Alice", "Bob", "Narrator")prompt_N: Voice clone prompt from VoiceClonePromptNodeDialogueInferenceNode. Supports up to 8 different voices per bank.VoiceClonePromptNode) [New]Extract and reuse voice features from reference audio.
ref_audio: A short (5-15s) audio clip to extract features from.ref_text: Text spoken in the ref_audio (highly recommended for better quality).model_choice: Choose between 0.6B (fast) or 1.7B (high quality).attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.VoiceCloneNode instances for faster and more consistent generation.DialogueInferenceNode) [New]Synthesize complex dialogues with multiple speakers.
script: Dialogue script in format "RoleName: Text".role_bank: Role bank from RoleBankNode containing voice prompts.model_choice: Choose between 0.6B (fast) or 1.7B (high quality).attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.pause_seconds: Silence duration between sentences.merge_outputs: Merge all dialogue segments into a single long audio.batch_size: Number of lines to process in parallel (larger = faster but more VRAM).LoadSpeakerNode) [New]Load saved voice features and metadata with zero configuration.
SaveVoiceNode) [New]Persist extracted voice features and metadata to disk for future use.
LoadSpeakerNode.All nodes support multiple attention implementations with automatic detection and graceful fallback:
| Mechanism | Description | Speed | Installation |
|---|---|---|---|
| sage_attn | SAGE attention implementation | ⚡⚡⚡ Fastest | pip install sageattention |
| flash_attn | Flash Attention 2 | ⚡⚡ Fast | pip install flash_attention |
| sdpa | Scaled Dot Product Attention (PyTorch built-in) | ⚡ Medium | Built-in (no installation) |
| eager | Standard attention (fallback) | 🐢 Slowest | Built-in (no installation) |
| auto | Automatically selects best available option | Varies | N/A |
When attention: "auto" is selected, the system checks in this order:
The selected mechanism is logged to the console for transparency.
If you select an attention mechanism that's not available:
sdpa (if available)eager (as last resort)The unload_model_after_generate toggle is available on all nodes:
When to use:
Console Output:
🗑️ [Qwen3-TTS] Unloading 1 cached model(s)...
✅ [Qwen3-TTS] Model cache and GPU memory cleared
Ensure you have the required dependencies:
pip install torch torchaudio transformers librosa accelerate
ComfyUI-Qwen-TTS automatically searches for models in the following priority:
ComfyUI/
├── models/
│ └── qwen-tts/
│ ├── Qwen/Qwen3-TTS-12Hz-1.7B-Base/
│ ├── Qwen/Qwen3-TTS-12Hz-0.6B-Base/
│ ├── Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign/
│ ├── Qwen/Qwen3-TTS-Tokenizer-12Hz/
│ └── voices/ (Saved presets .wav/.qvp)
Note: You can also use extra_model_paths.yaml to define a custom model path:
qwen-tts: D:\MyModels\Qwen
bf16 precision to save significant memory with minimal quality loss.attention: "auto" for automatic selection of fastest available mechanism.unload_model_after_generate if you have limited VRAM (< 8GB) or need to run multiple different models.models/qwen-tts/ to prioritize local loading and avoid HuggingFace timeouts.sage_attn or flash_attn for 2-3x speedup over sdpa.sdpa (default) for maximum compatibility - no installation required.eager with smaller models (0.6B) if other mechanisms cause OOM errors.batch_size for faster generation (more VRAM usage).pause_seconds to control timing between dialogue segments.merge_outputs for continuous dialogue; disable for separate clips.Python
100.0%
English | 中文版
⚠️ CRITICAL: transformers Version Requirement
Qwen3-TTS works on transformers 4.57.3 and transformers >= 5 (v5.0+ compatibility is provided by
tools/transformers5_shim.py, applied automatically on import). On transformers < 5 the shims are no-ops, so the 4.57.3 path is unchanged:pip install transformers==4.57.3 # v4 path (shims inactive) # or pip install "transformers>=5.0" # v5 path (shims applied)

ComfyUI custom nodes for speech synthesis, voice cloning, and voice design, based on the open-source Qwen3-TTS project by the Alibaba Qwen team.
QwenTTSConfigNode due to voice inconsistency; fixed MPS precision bug & CustomVoice channel mismatch; code cleanup (update.md)extra_model_paths.yaml support (update.md)VoiceDesignNode)Generate unique voices based on text descriptions.
text: Target text to synthesize.instruct: Description of the voice (e.g., "A gentle female voice with a high pitch").model_choice: Currently locked to 1.7B for VoiceDesign features.attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.VoiceCloneNode)Clone a voice from a reference audio clip.
ref_audio: A short (5-15s) audio clip to clone.ref_text: Text spoken in the ref_audio (helps improve quality).target_text: The new text you want the cloned voice to say.model_choice: Choose between 0.6B (fast) or 1.7B (high quality).attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.CustomVoiceNode)Standard TTS using preset speakers.
text: Target text.speaker: Selection from preset voices (Aiden, Eric, Serena, etc.).instruct: Optional style instructions.attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.RoleBankNode) [New]Collect and manage multiple voice prompts for dialogue generation.
role_name_N: Name of the role (e.g., "Alice", "Bob", "Narrator")prompt_N: Voice clone prompt from VoiceClonePromptNodeDialogueInferenceNode. Supports up to 8 different voices per bank.VoiceClonePromptNode) [New]Extract and reuse voice features from reference audio.
ref_audio: A short (5-15s) audio clip to extract features from.ref_text: Text spoken in the ref_audio (highly recommended for better quality).model_choice: Choose between 0.6B (fast) or 1.7B (high quality).attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.VoiceCloneNode instances for faster and more consistent generation.DialogueInferenceNode) [New]Synthesize complex dialogues with multiple speakers.
script: Dialogue script in format "RoleName: Text".role_bank: Role bank from RoleBankNode containing voice prompts.model_choice: Choose between 0.6B (fast) or 1.7B (high quality).attention: Attention mechanism (auto, sage_attn, flash_attn, sdpa, eager).unload_model_after_generate: Unload model from memory after generation to free GPU memory.pause_seconds: Silence duration between sentences.merge_outputs: Merge all dialogue segments into a single long audio.batch_size: Number of lines to process in parallel (larger = faster but more VRAM).LoadSpeakerNode) [New]Load saved voice features and metadata with zero configuration.
SaveVoiceNode) [New]Persist extracted voice features and metadata to disk for future use.
LoadSpeakerNode.All nodes support multiple attention implementations with automatic detection and graceful fallback:
| Mechanism | Description | Speed | Installation |
|---|---|---|---|
| sage_attn | SAGE attention implementation | ⚡⚡⚡ Fastest | pip install sageattention |
| flash_attn | Flash Attention 2 | ⚡⚡ Fast | pip install flash_attention |
| sdpa | Scaled Dot Product Attention (PyTorch built-in) | ⚡ Medium | Built-in (no installation) |
| eager | Standard attention (fallback) | 🐢 Slowest | Built-in (no installation) |
| auto | Automatically selects best available option | Varies | N/A |
When attention: "auto" is selected, the system checks in this order:
The selected mechanism is logged to the console for transparency.
If you select an attention mechanism that's not available:
sdpa (if available)eager (as last resort)The unload_model_after_generate toggle is available on all nodes:
When to use:
Console Output:
🗑️ [Qwen3-TTS] Unloading 1 cached model(s)...
✅ [Qwen3-TTS] Model cache and GPU memory cleared
Ensure you have the required dependencies:
pip install torch torchaudio transformers librosa accelerate
ComfyUI-Qwen-TTS automatically searches for models in the following priority:
ComfyUI/
├── models/
│ └── qwen-tts/
│ ├── Qwen/Qwen3-TTS-12Hz-1.7B-Base/
│ ├── Qwen/Qwen3-TTS-12Hz-0.6B-Base/
│ ├── Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign/
│ ├── Qwen/Qwen3-TTS-Tokenizer-12Hz/
│ └── voices/ (Saved presets .wav/.qvp)
Note: You can also use extra_model_paths.yaml to define a custom model path:
qwen-tts: D:\MyModels\Qwen
bf16 precision to save significant memory with minimal quality loss.attention: "auto" for automatic selection of fastest available mechanism.unload_model_after_generate if you have limited VRAM (< 8GB) or need to run multiple different models.models/qwen-tts/ to prioritize local loading and avoid HuggingFace timeouts.sage_attn or flash_attn for 2-3x speedup over sdpa.sdpa (default) for maximum compatibility - no installation required.eager with smaller models (0.6B) if other mechanisms cause OOM errors.batch_size for faster generation (more VRAM usage).pause_seconds to control timing between dialogue segments.merge_outputs for continuous dialogue; disable for separate clips.Python
100.0%