AudioEncoderEncode
The generic bridge between audio and its latent form
- audio_encoder
- audio
- AUDIO_ENCODER_OUTPUT
AudioEncoderEncode is the plumbing node of ComfyUI's audio stack: it takes audio in its raw waveform form and pushes it through an audio encoder to get the latent representation the models actually work with. It's the audio-world equivalent of VAE Encode for images - and just like VAE Encode, it's not glamorous, but every audio conditioning workflow quietly depends on it.
Where you'll actually meet it is around the music/audio generation models that ship in core - ACE-Step being the current star. You load a model with a loader, load its audio encoder with the "Load Audio Encoder" node, and when you want the model to listen to an existing clip (as a reference, for extension, for editing), you encode that clip with this node first. The encoded output is what downstream conditioning and sampling nodes accept.
How it works
The execution is deliberately boring: it calls encode_audio on the loaded encoder with the audio's waveform and sample rate, and hands back whatever latent the encoder produced. The type system keeps you honest - the input is an AUDIO_ENCODER (from Load Audio Encoder) and AUDIO (from Load Audio or similar), and the output is AUDIO_ENCODER_OUTPUT, a distinct type so you can't accidentally wire raw audio where a latent is expected.
Inputs and output
- audio_encoder - the encoder model from "Load Audio Encoder." The model files for those live in ComfyUI's
models/audio_encodersfolder. - audio - the audio to encode, carrying waveform + sample rate.
Output: the AUDIO_ENCODER_OUTPUT, ready for the audio-aware conditioning or sampling nodes.
Where it fits
It ships with ComfyUI core, part of the same audio-encoder system as the loader (both landed together). Nothing to install. It's a genuinely thin utility node - which is fine. Most of the "model/conditioning" category is about turning text into conditioning; this one turns sound into conditioning, and it's the rare node you can wire up and forget about entirely.
Common issues
The failure modes are mostly upstream: the encoder and the model have to come from the same model family - a mismatched encoder produces latents the sampler can't read, usually surfacing as garbage audio or a shape error rather than a friendly message. Also, sample rate matters: if your input audio was resampled to something the encoder wasn't trained for, output quality quietly degrades. And this node only encodes; it doesn't decode back. If you're looking for the reverse direction, that's a separate decode node on the audio-latent side.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_encoder | AUDIO_ENCODER | — | |
| audio | AUDIO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO_ENCODER_OUTPUT | AUDIO_ENCODER_OUTPUT | — |