Nodes/XB_ToolBox/XB_WanSCAILToVideoPro
ComfyUI Node

XB_WanSCAILToVideoPro

SCAIL-2 with the relay bookkeeping built in

By wjluoxiao·Created 5 months ago·Updated 6 days ago· 302
XB_WanSCAILToVideoPro
  • positive
  • negative
  • vae
  • pose_video
  • pose_video_mask
  • reference_image
  • reference_image_mask
  • clip_vision_output
  • previous_frames
  • positive
  • negative
  • latent
  • video_frame_offset
width512
height896
length81
batch_size1
pose_strength1.00
pose_start0.00
pose_end1.00
replacement_modefalse
video_frame_offset0
previous_frame_count5
vae_tile_size64

This is the engine under XB's SCAIL relay chain - a port of ComfyUI core's SCAIL-2 logic with VAE tiling bolted on, plus everything you need to extend a SCAIL video segment by segment instead of restarting from scratch. The plain XB_WanSCAILToVideo does one isolated clip; this one tracks where you are in the pose video, continues from your previous segment's tail frames, and hands back an offset so the next segment picks up exactly where this one stopped. If you're hand-rolling a long SCAIL animation rather than using the relay node, this is the building block.

How it works

The core is the same as plain SCAIL - pose video encoded at half res × pose_strength over a pose_startpose_end timestep window, reference image encoded into reference_latents, optional clip_vision_output for identity. The "Pro" part is what surrounds it:

  • video_frame_offset - where in the pose video this segment starts. It slices the pose video (and mask) from that offset, and returns a new offset as an output so you can feed the next segment.
  • previous_frames / previous_frame_count - the tail frames of your last segment. It trims them onto the front of the new segment and subtracts them from the offset, which is how two generations get seamless continuity instead of a jump cut.
  • replacement_mode - off = animation mode (character performs the pose). On = replacement mode, where your reference character replaces the subject of the pose video, and reference_image_mask isolates the region being replaced (the reference is composited onto black using the mask as an alpha matte).
  • pose_video_mask - SCAIL-2's colored-mask video, which lets different regions follow different parts of the pose.

Everything goes through vae_tile_size tiled encoding so long segments don't OOM.

The inputs

  • positive / negative / vae / width / height / length / batch_size - standard.
  • pose_strength / pose_start / pose_end - pose control.
  • replacement_mode / video_frame_offset / previous_frame_count - the extension machinery above.
  • vae_tile_size - tiling.
  • pose_video / pose_video_mask / reference_image / reference_image_mask / clip_vision_output / previous_frames - optional inputs; leave unwired and the node degrades to a plain SCAIL segment.

Outputs: positive, negative, latent (go to a sampler, then decode) and video_frame_offset (INT) - the offset to feed the next segment.

Install

Pack install - Manager search XB_ToolBox, or clone into custom_nodes, restart. Needs a SCAIL model (Wan 2.1 14B SCAIL, fp8 scaled variant for smaller cards). It reads from core ComfyUI SCAIL infrastructure, so no wrapper needed for this one beyond the pack itself.

Common issues

If continuity breaks between segments, your previous_frame_count is too small - keep it at 5 or above. In replacement mode with no reference_image_mask, nothing gets isolated and you'll wonder why the output looks like plain animation mode. And feeding a stale video_frame_offset is the classic way to repeat a chunk of motion: always pass the offset output of the previous segment into the next one.

CategoryXB_ToolBox/Pipeline

Inputs (20)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT51216–8192
heightINT89632–8192
lengthINT811–8192
batch_sizeINT11–4096
pose_strengthFLOAT1.000–10
pose_startFLOAT0.000–1
pose_endFLOAT1.000–1
replacement_modeBOOLEANfalse
video_frame_offsetINT00–8192
previous_frame_countINT51–8192
vae_tile_sizeINT6464–3840
pose_videooptIMAGE
pose_video_maskoptIMAGE
reference_imageoptIMAGE
reference_image_maskoptIMAGE
clip_vision_outputoptCLIP_VISION_OUTPUT
previous_framesoptIMAGE

Outputs (4)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
video_frame_offsetINT