ComfyUI Node

ORPH_Decode

From token stream to audible speech, in one node

By AustinMroz·Created about a year ago·Updated about a year ago· 1
ORPH_Decode
  • tokens
  • vae
  • AUDIO

ORPH_Decode is the last stop on the Orpheus TTS line. Everything before it - the loader, the prompt, the sampler - produces tokens, which are not something you can listen to. This node is what finally turns those tokens into an actual AUDIO clip you can preview, save, or feed into a video pipeline. In the pack's example workflow it sits right before PreviewAudio, and that's exactly the job it does: the "make it sound real" step.

How it works

Decode is the mirror image of the encoding path, and it's worth knowing because it explains why the pack needs its own VAE. It takes the token stream, strips the section tokens (start/end of speech, the human/AI framing) from both ends, truncates to a whole number of 7-token audio frames, and reshapes them. Each frame holds one group of codes that the SNAC codec expects: one code from codebook 0, two from codebook 1, four from codebook 2 - the hierarchical 1+2+4 split at the heart of the codec. The node reverses the per-codebook offset the encoder applied, runs the SNAC VAE's decode, and returns a waveform plus its sample rate.

The waveform comes back at 24000 Hz - that's the SNAC 24 kHz codec's native rate, so you can pipe it straight into PreviewAudio or SaveAudio without thinking about it.

The inputs and outputs that matter

Two inputs, and both matter:

  • tokens (ORPH_TOKENS) - the speech token stream, typically the chunk output of ORPH_Sample. This is the one beginners get wrong: feed it the full output and you're handing the decoder a mix of text tokens and audio codes, which produces garbage or an error.
  • vae (VAE) - from ORPH_SnacVae, the SNAC 24 kHz codec loaded as a VAE. Not an image VAE - the pack explicitly notes ComfyUI's native VAE audio handling forces the wrong sample rate and can't be used here.

One output: AUDIO, which wires into anything that accepts ComfyUI's audio type - PreviewAudio, SaveAudio, or the audio input of a video-combine node if you're building a talking-head or lip-sync workflow.

Installing it

Same pack, same steps: ComfyUI Manager (search ComfyUI-Orpheus) or:

cd ComfyUI/custom_nodes
git clone https://github.com/AustinMroz/ComfyUI-Orpheus

Restart, then make sure both weight files are in place - Orpheus 3B in models/orpheus/ and the SNAC 24 kHz model.safetensors in models/vae/. This node specifically needs the SNAC weights, since decoding is the VAE running in reverse.

Common issues

  • "Invalid codes. Should be impossible." That's a real error message in the source, and it means the token stream wasn't valid audio codes - almost always because you fed Decode tokens that came from a text prompt (ORPH_Prompt output) instead of a sampler output, or tokens with doubled section framing. Check your wiring, not your sanity.
  • Silence or noise instead of speech. You gave it the wrong tokens or the wrong VAE. Re-verify that vae is the SNAC node and tokens is chunk/generated from ORPH_Sample.
  • Pack shows up broken. The torchaudio import at module load strikes again - stock ComfyUI doesn't always ship it. pip install torchaudio matching your torch version and restart.

The model-side generation gets all the glory, but Decode is where you find out if the run actually worked. It's a small, honest node: tokens in, 24 kHz audio out.

Categorysd

Inputs (2)

NameTypeDefaultDescription
tokensORPH_TOKENS
vaeVAE

Outputs (1)

NameTypeDescription
AUDIOAUDIO