Nodes/XB_ToolBox/XB-BOX - 🏃 InfiniteTalk 无限对口型接力点
ComfyUI Node

XB-BOX - 🏃 InfiniteTalk 无限对口型接力点

A segment generator that knows where the audio ends

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB-BOX - 🏃 InfiniteTalk 无限对口型接力点
  • wan_infinitetalk_bus
  • prev_video
  • prev_audio
  • audio
  • 📦 WAN_INFINITETALK_BUS (传给下段)
  • 🎞️ 累加视频流
  • 🔊 累加音频流
positive_prompt
segment_length81

Every long-form video pipeline eventually needs the thing that makes it stop at the right place. XB_WanInfiniteTalk_RelayNode ("XB-BOX - 🏃 InfiniteTalk 无限对口型接力点") is one relay segment of the pack's InfiniteTalk talking-head pipeline - and unlike the plain Wan relays, it carries audio along with the video and knows when the track runs out.

The flow per segment is the standard relay recipe: encode the positive prompt, run the audio-conditioned model, sample, decode, trim the overlap, accumulate. But the two things that make this one different are audio handling and frame accounting.

How it works

Each relay takes the WAN_INFINITETALK_BUS, a positive_prompt, and a segment_length (81 default), plus optional prev_video, prev_audio and audio. Then it picks a mode:

  • Bus audio mode - the bus already encoded your long audio (that's what total_frames > 0 on the bus means). The relay computes what's left by comparing accumulated frames to the total, slices the pre-encoded audio at the right frame offset, and skips itself entirely when the budget is exhausted. The last segment is the clever bit: it trims the motion-overlap frames correctly and rounds the length up to a valid Wan 4n+1 frame count so you don't get a clip that ends two frames early.
  • Independent audio mode - no pre-encoded bus audio, so each relay takes its own audio input, encodes it, and pads it with silence to the aligned frame count. Per-segment control, at the cost of re-encoding.

Either way the relay then: builds the audio+image conditioning, samples through the model, decodes, trims the motion_frame_count overlap so transitions don't double up, and accumulates both the video and the audio. Outputs: the bus to pass on, 🎞️ 累加视频流 (accumulated video), and 🔊 累加音频流 (accumulated audio) - so the end of the chain gives you a video and its synchronized sound in one shot.

Inputs that matter

segment_length is the one you'll actually set - 81 frames at 25fps is about 3.2 seconds per segment. The audio mode is decided upstream on the bus, not here; if you leave the bus's total_frames at 0 and don't feed audio, the relay logs "no audio, skipping" and passes a black/zero buffer through. That's by design, not a bug - it lets you build a chain where only some segments talk.

Install & expectations

Standard pack: ComfyUI Manager → XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes, restart. Deps opencv-python + easyocr, no weights bundled - InfiniteTalk weights, audio encoder, VAE/CLIP/T5 are yours. The model is genuinely capable of seamless long talking takes (the community's own words: "cannot see the transitions"), but audio alignment is where InfiniteTalk pipelines usually fight you - if lips drift out of sync, check that your audio encoder's framerate assumptions match the relay's 25fps pipeline before blaming the node.

CategoryXB_ToolBox/Pipeline

Inputs (6)

NameTypeDefaultDescription
wan_infinitetalk_busWAN_INFINITETALK_BUS
positive_promptSTRING
segment_lengthINT811–8192
prev_videooptIMAGE
prev_audiooptAUDIO
audiooptAUDIO

Outputs (3)

NameTypeDescription
📦 WAN_INFINITETALK_BUS (传给下段)WAN_INFINITETALK_BUS
🎞️ 累加视频流IMAGE
🔊 累加音频流AUDIO