Nodes/XB_ToolBox/XB-BOX - 🎵 语音转视频分块(双人)
ComfyUI Node

XB-BOX - 🎵 语音转视频分块(双人)

Dual-speaker InfiniteTalk chunks with per-person masks

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 🎵 语音转视频分块(双人)
  • model
  • model_patch
  • positive
  • negative
  • vae
  • audio_encoder_output_1
  • audio_encoder_output_2
  • mask_1
  • mask_2
  • clip_vision_output
  • start_image
  • previous_frames
  • model
  • positive
  • negative
  • latent
  • trim_image
width832
height480
length81
motion_frame_count9
audio_scale1.00
vae_tile_size256
scale_methodlanczos
crop_modecenter

A conversation is the hardest thing to make with video-gen: two characters in frame, each with their own voice, and the model has to know which audio belongs to which face. XB_WanInfiniteTalkToVideo_Dual ("XB-BOX - 🎵 语音转视频分块(双人)") is the pack's dual-speaker engine for exactly that - one chunk of InfiniteTalk audio-to-video where two audio tracks drive two masked regions of the same frame.

The mechanism is the shared audio-processing helper, but with both audio channels and both masks required. The node is strict about it, and that strictness is your friend:

  • It refuses to run with two audio encoders but no masks, and refuses with two masks but only one audio encoder - a ValueError with a clear message, not a silent half-broken generation.
  • The two masks are concatenated into ref_masks and both encoded audio streams are combined (the helper's default combination mode), so each character's lips are driven by their own voice rather than a blended average.

Inputs

Required: model, model_patch, positive/negative, vae, width/height (832×480), length (81), both audio_encoder_output_1 and audio_encoder_output_2, both mask_1 and mask_2, motion_frame_count, audio_scale, vae_tile_size. Optional: clip_vision_output, start_image, previous_frames, scale_method, crop_mode.

The masks deserve a moment. Each is a binary mask over the frame marking one speaker's region - roughly "character A's face area" and "character B's face area." Get them roughly right; the model is more forgiving of mask slop than you'd fear, but a mask that overlaps both faces will confuse the audio assignment and you'll get mush where the boundary is.

Outputs are the standard five: patched model, positive, negative, latent, trim_image.

Why the fixed node over the combo

The combo node (XB_WanInfiniteTalkToVideo) can do two-speaker via its mode toggle, but it also accepts one-speaker configs. _Dual hard-requires both audio streams and both masks in the schema, so a graph that's supposed to be a duet can't accidentally degrade into a solo with stray inputs. If "this is a conversation" is a permanent property of your pipeline, use the dedicated node.

Install & expectations

Pack standard: ComfyUI Manager → XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. Deps opencv-python + easyocr; InfiniteTalk weights, audio encoder, VAE/CLIP/T5 are yours.

Honest read: dual-speaker is the deepest end of an already-niche model. Community reports for InfiniteTalk are mostly single-speaker seamless takes, so you're farther from well-trodden ground here - expect to iterate on masks and audio_scale to get both voices reading cleanly. The plumbing is solid; the model is doing the heavy lifting, and it's doing it at 14B speed.

CategoryXB_ToolBox/Pipeline

Inputs (20)

NameTypeDefaultDescription
modelMODEL
model_patchMODEL_PATCH
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–8192
heightINT48016–8192
lengthINT811–8192
audio_encoder_output_1AUDIO_ENCODER_OUTPUT
audio_encoder_output_2AUDIO_ENCODER_OUTPUT
mask_1MASK
mask_2MASK
motion_frame_countINT91–33
audio_scaleFLOAT1.00-10–10
vae_tile_sizeINT25664–3840
clip_vision_outputoptCLIP_VISION_OUTPUT
start_imageoptIMAGE
previous_framesoptIMAGE
scale_methodoptCOMBOlanczos5 options: lanczos, bilinear, bicubic, nearest-exact, area
crop_modeoptCOMBOcenter2 options: center, disabled

Outputs (5)

NameTypeDescription
modelMODEL
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
trim_imageINT