XB_WanSoundImageToVideoExtend
Keep the audio going, extend the video
- positive
- negative
- vae
- video_latent
- audio_encoder_output
- ref_image
- control_video
- positive
- negative
- latent
Audio-to-video has a hard ceiling: a single Wan 2.2 generation only covers so many frames. This node is the extension segment for the pack's audio pipeline - same job as XB_WanSoundImageToVideo, but instead of taking width/height/batch it takes the video_latent from your previous segment's sampler, reads the dimensions and frame offset off that latent, and generates the next chunk continuing from it. Chain a few of these and your talking character keeps talking past the single-clip limit.
How it works
It inspects the incoming video_latent to recover everything the plain node would have asked for: width = latent W × 8, height = latent H × 8, batch from the batch dim, and a starting frame offset = latent T × 4 (latent frames run at 4× video frames). It then calls the same shared xb_wan_sound_to_video helper, but passes your previous latent as ref_motion_latent - so the model sees the tail of what it just made and continues from it instead of starting blind - and slices the audio to start at the right offset for the new segment. Same audio_embed/reference_latents/control_video injection as the base node, just positioned later in the timeline.
The inputs
- positive / negative / vae - as usual.
- length - the new segment's length in frames (default 77).
- video_latent - the input that makes this "Extend": the
LATENToutput of the previous segment's sampler, not the decoded video. - vae_tile_size - tiling.
- audio_encoder_output / ref_image / control_video (optional) - audio for this segment, identity, structure.
audio_encoder_outputis required in spirit - without audio the "sound" part of the pipeline is dead.
Outputs: positive, negative, latent - the new segment's conditioning and latent, which you sample and decode, then feed into the next Extend node.
Install
Pack install - ComfyUI Manager search XB_ToolBox, or clone into custom_nodes, restart. Needs the wrapper and the Wan 2.2 audio-capable model, same as the base node.
Common issues
Feeding this node a decoded IMAGE instead of the LATENT is the classic mistake - it needs the raw latent, so wire sampler → this node. If the audio and video drift apart across segments, your length doesn't match the audio chunk you're feeding it; keep each segment's length consistent with the audio you encoded for it. And if the second segment suddenly changes style, the reference continuity depends on ref_image being present in the chain - it can't inherit it from the previous latent alone.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| length | INT | 771–8192 | — |
| video_latent | LATENT | — | |
| vae_tile_size | INT | 6464–3840 | — |
| audio_encoder_outputopt | AUDIO_ENCODER_OUTPUT | — | |
| ref_imageopt | IMAGE | — | |
| control_videoopt | IMAGE | — | |
| scale_methodopt | COMBO | lanczos | 5 options: lanczos, bilinear, bicubic, nearest-exact, area |
| crop_modeopt | COMBO | center | 2 options: center, disabled |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |