Nodes/XB_ToolBox/XB-BOX - ๐Ÿ†• Wan ๆ— ้™ๆŽฅๅŠ›็‚น (New)
ComfyUI Node

XB-BOX - ๐Ÿ†• Wan ๆ— ้™ๆŽฅๅŠ›็‚น (New)

Relay_count turns N nodes into one

By wjluoxiaoยทCreated 7 months agoยทUpdated a day agoยท 406
XB-BOX - ๐Ÿ†• Wan ๆ— ้™ๆŽฅๅŠ›็‚น (New)
  • wan_bus
  • start_image
  • prev_video
  • ๐Ÿ“ฆ WAN_BUS (Pass to next)
  • ๐Ÿ–ผ๏ธ Current End Image (Connect to next Start Image)
  • ๐ŸŽž๏ธ Accumulated Video Stream
โ—„positive_promptDescribe the specific action for this segment...โ–บ
โ—„trim_head_frames1โ–บ
โ—„relay_count1โ–บ
โ—„total_frames_displayโ–บ

The original XB_Wan_InfiniteRelayNode does one segment per node, which means a 20-second clip is four copies of the same node in a row - cleaner than hand-chaining, but still repetitive. XB_Wan_InfiniteRelayNode_New ("XB-BOX - ๐Ÿ†• Wan ๆ— ้™ๆŽฅๅŠ›็‚น (New)") is the quality-of-life update: it adds a relay_count dial so one node loops N segments internally. Set it to 3 and you get three chained relays out of a single node, each one re-seeding the next with its end image.

That's the whole pitch, and it's a good one. For a fixed-length scene you no longer add or delete nodes when the runtime changes - you just bump a number. The node's tooltip says it plainly: "ๆœฌ่Š‚็‚น่‡ชๅŠจๅพช็Žฏ N ๆฌก = ไธฒ่” N ไธชๆŽฅๅŠ›็‚น" (this node auto-loops N times = chaining N relay points).

What's new versus the original

The internals are the same trusted pipeline - encode prompt, build the segment latent via XB_WanImageToVideo, two-pass high/low noise sampling with the model_high/model_low split, decode, trim, progressive color correction, accumulate. The differences are the inputs it exposes directly on the node instead of burying in the bus:

  • trim_head_frames (default 1) - the overlap-dedupe count, now set per relay instead of inherited from the bus.
  • relay_count (default 1) - how many segments this node runs. The loop feeds each segment's last_frame back in as the next current_image, then accumulates everything into one stream.
  • total_frames_display - a read-only field the node fills in with its estimate of total frames ((length โˆ’ trim) ร— relay_count), so you can sanity-check duration without doing arithmetic.

Everything else flows from the bus: resolution, length, sampler, cfg, seed, chunking, concat_mode. Outputs are unchanged - WAN_BUS to pass on, the final end image, and the accumulated video.

When it's the right tool

Use the New node when your scene is one continuous shot of a known length - a 16-second pan is relay_count: 2 at 81-frame segments, done. Use the original chain of separate relays when you want per-segment control: a different prompt per scene beat, a start_image change, or the ability to eyeball segment 2 before committing to segment 3. The loop version runs all N segments in one queue shot, so if segment 2 is bad you've already paid for 3.

Install & caveats

Same pack, same ritual: ComfyUI Manager โ†’ XB_ToolBox, or git clone https://github.com/wjluoxiao/XB_ToolBox.git into custom_nodes and restart. Declared pip deps: opencv-python, easyocr. No weights bundled.

One honest note: relay_count multiplies runtime directly - four relays is four full 81-frame generations, and on a 12GB card that's a half-hour-plus coffee break. And because every segment shares one positive_prompt here, this node is for motion continuity, not storytelling. If your segments need different action descriptions, that's the older node's job.

CategoryXB_ToolBox/Pipeline

Inputs (7)

NameTypeDefaultDescription
wan_busWAN_BUSโ€”
start_imageIMAGEโ€”
positive_promptSTRINGDescribe the specific action for this segment...โ€”
trim_head_framesINT11โ€“8192ๆŽฅๅŠ›้‡ๅ ๅธงๆ•ฐ๏ผˆๅŽป้‡๏ผ‰
relay_countINT11โ€“999ๆŽฅๅŠ›ๆ•ฐ้‡่ฎพๅฎš๏ผšๆœฌ่Š‚็‚น่‡ชๅŠจๅพช็Žฏ N ๆฌก = ไธฒ่” N ไธชๆŽฅๅŠ›็‚น
total_frames_displaySTRINGๆ€ป่ฎก็”Ÿๆˆๅธงๆ•ฐ๏ผˆ่‡ชๅŠจ่ฎก็ฎ—๏ผ‰
prev_videooptIMAGEโ€”

Outputs (3)

NameTypeDescription
๐Ÿ“ฆ WAN_BUS (Pass to next)WAN_BUSโ€”
๐Ÿ–ผ๏ธ Current End Image (Connect to next Start Image)IMAGEโ€”
๐ŸŽž๏ธ Accumulated Video StreamIMAGEโ€”