XB-BOX - 🎵 语音转视频分块
One node for InfiniteTalk audio-to-video segments, single or dual speaker
- model
- model_patch
- positive
- negative
- vae
- audio_encoder_output_1
- audio_encoder_output_2
- clip_vision_output
- start_image
- previous_frames
- mask_1
- mask_2
- model
- positive
- negative
- latent
- trim_image
Every relay in the pack's InfiniteTalk pipeline eventually calls down to one node that actually does the audio-to-video work: XB_WanInfiniteTalkToVideo ("XB-BOX - 🎵 语音转视频分块"). This is the "voice to video chunk" engine - it takes an audio encoder output, a start image, and conditioning, then builds the model patch and latent that make the character's lips and motion follow the audio for one chunk of video.
The author's own description in the source is "兼容旧工作流" - a compatibility node for older workflows - because it's the do-everything version: a single mode toggle switches between single-speaker and two-speaker operation. The pack also ships the split single/dual nodes (..._Single and ..._Dual) if you prefer fixed, unambiguous sockets.
How it works
Everything funnels through one shared audio-processing helper (_process_infinite_talk_audio), which does the real work:
- Clones the model - all audio patches are applied to a
clone(), so a cancelled run or OOM leaves the original model unpolluted. - Pins the start image - VAE-encodes it into
concat_latent_image+concat_maskso frame one is locked (standard Wan I2V bookending). - Builds the audio conditioning - stacks the
audio_encoder_output's per-layer embeddings, downsamples from 50fps to 25fps feature rate, and writes it into the conditioning as the audio drive. For two speakers, bothaudio_encoder_output_1and_2are encoded and combined; the node refuses to run two-speaker without both masks. - Handles the overlap - if you feed
previous_frames, they're checked againstmotion_frame_count(it raises if you give fewer frames than the overlap), giving the model the tail of the last segment so the transition is continuous.
Outputs: model (the patched clone), positive, negative, latent, and trim_image - an INT telling the relay how many overlap frames to trim off the start of this chunk.
Inputs that matter
mode (single_speaker default / two_speakers) is the fork in the road. audio_encoder_output_1 is the required audio; _2 plus mask_1/mask_2 are required for two speakers (masks say who's who in the frame). motion_frame_count (9) is the transition overlap, audio_scale (1.0) the audio-to-motion strength. vae_tile_size (256 default here) controls encode memory.
Install & honest caveats
Pack standard: ComfyUI Manager → XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. Deps opencv-python + easyocr; weights are yours (InfiniteTalk checkpoint, Wan audio encoder, VAE/CLIP/T5).
This node does not sample - it returns the patched model, conditioning and latent, which you feed to a KSampler (or let a relay handle it). And it's a segment engine: 81 frames in, 3-ish seconds out. InfiniteTalk is a genuine open talking-head model with real community success stories, but if you're here, you've committed to the audio-driven niche - the rewards (characters who talk for as long as your audio) are worth the plumbing.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| model_patch | MODEL_PATCH | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| mode | COMBO | single_speaker | 2 options: single_speaker, two_speakers |
| width | INT | 83216–8192 | — |
| height | INT | 48016–8192 | — |
| length | INT | 811–8192 | — |
| audio_encoder_output_1 | AUDIO_ENCODER_OUTPUT | — | |
| motion_frame_count | INT | 91–33 | — |
| audio_scale | FLOAT | 1.00-10–10 | — |
| vae_tile_size | INT | 25664–3840 | — |
| audio_encoder_output_2opt | AUDIO_ENCODER_OUTPUT | — | |
| clip_vision_outputopt | CLIP_VISION_OUTPUT | — | |
| start_imageopt | IMAGE | — | |
| previous_framesopt | IMAGE | — | |
| mask_1opt | MASK | — | |
| mask_2opt | MASK | — | |
| scale_methodopt | COMBO | lanczos | 5 options: lanczos, bilinear, bicubic, nearest-exact, area |
| crop_modeopt | COMBO | center | 2 options: center, disabled |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| trim_image | INT | — |