Nodes/ComfyUI-WanVideoWrapper/WanVideo Add S2V Embeds
ComfyUI Node Runs on cloud

WanVideo Add S2V Embeds

Audio- and pose-driven conditioning for Wan S2V

By kijai·Created about a year ago·Updated 2 months ago· 6,651
WanVideo Add S2V Embeds
  • embeds
  • audio_encoder_output
  • ref_latent
  • pose_latent
  • vae
  • image_embeds
  • audio_frame_count
frame_window_size80
audio_scale1.0
pose_start_percent0.00
pose_end_percent1.00
enable_framepackfalse

S2V is Wan's sound-to-video mode - the S2V-14B model Alibaba shipped alongside the rest of the 2.2 family, built to animate a subject driven by audio (speech, and with pose control on top). This node is where you assemble the S2V conditioning: it folds audio-encoder output, an optional reference latent, and optional pose latents into your Wan image embeds so the sampler produces an audio-driven, optionally pose-guided clip.

It's one of the more feature-rich nodes in the pack because S2V itself does a lot - talking, plus body/pose motion, plus reference anchoring, plus a framepack option for going longer. Most of its inputs are optional precisely so you can use as much or as little of that as your workflow needs.

How it works

The node adds S2V-specific conditioning onto an existing WANVIDIMAGE_EMBEDS. Audio-encoder output drives the speech/motion; a reference latent anchors appearance; pose latents (with their own start/end window) steer body movement; and a framepack toggle enables the long-form chunking behavior. It works in windows of frame_window_size frames and also reports back how many audio frames it accounted for, so you can keep the rest of the graph in step.

The inputs that matter

Required:

  • embeds (WANVIDIMAGE_EMBEDS) - the embeds you're adding S2V conditioning to.
  • frame_window_size (default 80) - the window the S2V processing steps through. Leave it near default unless you have a reason.
  • audio_scale (default 1) - how hard the audio drives motion.
  • pose_start_percent / pose_end_percent (0 to 1) - the slice of the clip where pose conditioning applies.

Optional (this is where the flexibility lives):

  • audio_encoder_output (AUDIO_ENCODER_OUTPUT) - the encoded audio driving the generation. No audio, no talking.
  • ref_latent (LATENT) - a reference to anchor appearance.
  • pose_latent (LATENT) - pose conditioning for body motion.
  • vae (WANVAE) - the Wan VAE, when the node needs to encode/decode.
  • enable_framepack (default false) - turn on framepack-style chunking for longer sequences.

Outputs: image_embeds (WANVIDIMAGE_EMBEDS) → the sampler, and audio_frame_count (INT), the frame tally you can route to nodes that need to match the audio length.

How to install it

ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart. A working S2V graph needs the Wan S2V (S2V-14B) model plus the audio encoder that produces AUDIO_ENCODER_OUTPUT - download those into the wrapper's model folders before wiring this up.

Common issues & troubleshooting

Nothing is talking. The audio input is optional on the node, so it'll happily run without it and give you a silent clip. If you wanted speech-driven motion, confirm audio_encoder_output is actually connected.

Audio and video length disagree. Use the audio_frame_count output - it's there specifically so you can align frame count to the audio you fed in. Ignoring it is how you end up with a clip that cuts off mid-sentence or runs on past the voice.

Pose conditioning does nothing or fights the audio. Check pose_start_percent/pose_end_percent - if the window is wrong the pose signal lands where you didn't intend. And feeding both strong audio motion and strong pose motion can conflict; introduce them one at a time.

Going long via framepack still costs you. enable_framepack extends length but doesn't repeal Wan's constraints - long S2V is still chunked, and identity/consistency across chunks remains the failure mode. Expect real compute time for anything past a few seconds.

CategoryWanVideoWrapper

Inputs (10)

NameTypeDefaultDescription
embedsWANVIDIMAGE_EMBEDS
frame_window_sizeINT801–100000Number of frames in a single window
audio_scaleFLOAT1.00–10Scale factor for audio embeddings
pose_start_percentFLOAT0.000–1Start percentage for pose embeddings
pose_end_percentFLOAT1.000–1End percentage for pose embeddings
audio_encoder_outputoptAUDIO_ENCODER_OUTPUT
ref_latentoptLATENT
pose_latentoptLATENT
vaeoptWANVAE
enable_framepackoptBOOLEANfalseEnable Framepack sampling loop, not compatible with context windows

Outputs (2)

NameTypeDescription
image_embedsWANVIDIMAGE_EMBEDS
audio_frame_countINT