Nodes/ComfyUI-FL-Qwen3TTS/FL Qwen3 TTS Audio Encode
ComfyUI Node

FL Qwen3 TTS Audio Encode

Turn any audio into Qwen3's discrete speech codes

By filliptm·Created 7 months ago·Updated 2 days ago· 149
FL Qwen3 TTS Audio Encode
  • tokenizer
  • audio
  • audio_codes

If you're making TTS, skip this node - honestly. Audio Encode is for the other path: taking an existing audio file and compressing it into the discrete code representation that Qwen3-TTS uses internally. It's the codec half of the 12Hz tokenizer, paired with Audio Decode, and it exists for people who want to work at the code level rather than the waveform level.

Who actually wants that? The training-adjacent crowd, mostly. Qwen3-TTS is an autoregressive codec model - it thinks in tokens, not samples. If you're building a custom pipeline, a dataset-prep step, or just curious what the model's compression actually looks like, you feed it audio here and get audio_codes out. It's also the same encoding the Training UI node does internally when it pre-tokenizes your fine-tuning dataset, so this node is essentially exposing that machinery to you directly.

How it works

The node needs a tokenizer from the Tokenizer Loader, plus an audio input from any node that outputs ComfyUI's standard AUDIO type - a load-audio node, a VHS video with audio, or a previous TTS generation. It resamples the audio to 24kHz, mono, runs it through the tokenizer's encode, and returns an audio_codes (QWEN3TTS_AUDIO_CODES) output that carries both the encoded codes and the sample rate.

Wire that output into Audio Decode to get the waveform back - a lossy round trip through the codec, not a copy - or into anything else that accepts QWEN3TTS_AUDIO_CODES as you build out a custom graph.

Inputs and output

  • tokenizer - from the Tokenizer Loader (Qwen3-TTS-Tokenizer-12Hz).
  • audio - any standard ComfyUI AUDIO.
  • Output: audio_codes (QWEN3TTS_AUDIO_CODES).

Installing

ComfyUI Manager → "FL Qwen3 TTS", or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI-FL-Qwen3TTS.git
cd ComfyUI-FL-Qwen3TTS
pip install -r requirements.txt

Restart, and let the Tokenizer Loader pull the 12Hz tokenizer on first use.

Gotchas

Remember the encode→decode round trip is lossy - it's a speech codec, not a file copier, so don't use it as a "convert audio to audio" passthrough. And it's CPU-cheap but not free; encoding long clips on a CPU-only machine will take a noticeable moment. If your audio has silent gaps or heavy noise, they encode too - the codes reflect exactly what you put in. Most importantly: if your goal is a voice saying new text, you're on the wrong node. Voice Clone is the one that does that. This node just repackages existing audio into tokens.

CategoryFL/Qwen3TTS

Inputs (2)

NameTypeDefaultDescription
tokenizerQWEN3TTS_TOKENIZER
audioAUDIO

Outputs (1)

NameTypeDescription
audio_codesQWEN3TTS_AUDIO_CODES