WanVideo Encode Ovi Audio
Feeding existing audio into an Ovi generation
- mmaudio_vae
- audio
- samples
This is the mirror image of the decode node in the same Ovi corner of the pack: instead of turning generated latents into audio, it takes existing audio and turns it into latents Ovi's pipeline can condition on. If you want to drive a video generation with a specific piece of audio - dialogue, music, a sound effect track - rather than letting Ovi generate the audio track from scratch alongside the video, this is where that audio enters the graph.
What it's for
Ovi generates video and audio jointly, and like most audio-video conditioning setups, "jointly generated" and "generation conditioned on your input" are two different modes that share the same underlying latent representation. This node handles the second case: it VAE-encodes an AUDIO object into the latent space Ovi's audio branch expects, so that latent can flow into the rest of the pipeline as conditioning rather than as something to be generated fresh. Common use: you have a voice line or a music clip already, and you want the video generation to sync to it, rather than generating an audio track blind and hoping it matches.
It reuses the same underlying VAE as the decode node - MMAudio's audio VAE, borrowed into Ovi's architecture rather than reinvented - so whatever you load for mmaudio_vae here should be the identical component you'd use to decode audio back out later in the same pipeline.
The inputs and output that matter
Two required inputs: mmaudio_vae (MMAUDIOVAE) - the audio VAE, and audio (AUDIO) - your source audio, loaded through a standard Load Audio node or produced elsewhere in your graph. No parameters to tune; this is a fixed encode transform, same as its decode counterpart.
Output is a single samples (LATENT) - the encoded audio latents, ready to feed into whatever conditioning input in your Ovi sampling setup expects them.
How to install it
Via ComfyUI Manager, search WanVideoWrapper and install, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
then restart. Needs Ovi's model weights and the MMAudio VAE component on top of your base Wan setup - none of that ships with the standard Wan T2V/I2V download, so plan for the extra downloads before your first run.
Common issues & troubleshooting
Length mismatch between your audio and your target video. Since Ovi generates video and audio in lockstep, audio that's dramatically longer or shorter than the frame count you're generating is a likely source of sync problems downstream. Trim or pad your source audio to roughly match your intended clip length before encoding.
Using a different VAE instance than the one your decode step uses. Because both encode and decode share the mmaudio_vae type, it's easy to accidentally load two separate MMAudio VAE nodes in a larger graph and wire them inconsistently. Keep it to one loader feeding both the encode and decode nodes to avoid subtle mismatches.
Silence or garbage audio output further downstream. Trace back to whether the source audio object actually contains sound - a Load Audio node pointed at the wrong file, or an empty/corrupt audio object from an earlier step, will encode "successfully" into latents that just represent silence or noise, and this node has no way to catch that upstream problem.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mmaudio_vae | MMAUDIOVAE | — | |
| audio | AUDIO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |