Nodes/ComfyUI/WanDancerEncodeAudio
ComfyUI Node Runs on cloud

WanDancerEncodeAudio

Wan-Dancer's audio analyzer

By Comfy-Org·Created 4 years ago·Updated about 12 hours ago· 130,663
WanDancerEncodeAudio
  • audio
  • audio_encoder_output
  • fps_string
video_frames149
audio_inject_scale1.00

Wan-Dancer is Alibaba's music-to-dance model - the one where you feed it a track and it makes a character move to the beat, Apache 2.0, released mid-2026 and built on the Wan 2.1 VAE. But a video model can't listen to audio, so something has to translate the song into something it can read. That's this node. WanDancerEncodeAudio takes your audio, computes a stack of music features, and packages them as an audio_encoder_output that WanDancerVideo will inject into the conditioning.

What it actually computes, from the source: it estimates the tempo from the original waveform, resamples to the feature-extraction rate, then builds a mel spectrogram and derives the classic music-analysis features from it - an onset envelope, MFCCs, chroma (pitch class), and one-hot onsets and beats from a beat tracker. These get concatenated into a single audio-feature tensor. It also works out the frame rate for the clip from the audio length and the video_frames you asked for, and hands you an fps_string - a ready-made Chinese-language phrase like "帧率是30fps" (frame rate is 30fps) meant to be pasted straight into your prompt, because that's what the reference Wan-Dancer pipeline expects. The audio_inject_scale (default 1) is how strongly those features push the video model when they're injected downstream.

Inputs: audio, video_frames (default 149 - Wan-Dancer's native clip length, and the WanDancerVideo node's tooltip tells you to keep it at 149), and audio_inject_scale. Outputs: audio_encoder_output (wire to WanDancerVideo) and fps_string (wire to your prompt text via a text-concat).

It's core (comfy_extras/nodes_wandancer.py), a recent addition, no install. The full dance pipeline is: load audio → WanDancerEncodeAudioWanDancerVideo (with the audio output fed in) → sampler → decode. You need the Wan-Dancer-14B checkpoint and its VAE.

Honest notes: Wan-Dancer landed so recently (July 2026) that there's not much community battle-scar tissue to report - it's still the "looks promising, needs testing" phase. Two things are clear from the design though. The fps_string is in Chinese because it's a direct port of the original pipeline - if your prompt is in English, keep that phrase as-is, the model was trained with it that way. And don't treat video_frames as a free dial: deviating from 149 forces the fps computation to stretch, and a dancer moving at a weird frame rate looks drunk. Change the song, not the frame count.

Categorymodel/conditioning/wan/dancer

Inputs (3)

NameTypeDefaultDescription
audioAUDIO
video_framesINT1491–16384
audio_inject_scaleFLOAT1.000–10The scale for the audio features when injected into the video model.

Outputs (2)

NameTypeDescription
audio_encoder_outputAUDIO_ENCODER_OUTPUT
fps_stringSTRINGThe calculated fps based on the audio length and the number of video frames. Used in the prompt.