Nodes/ComfyUI-SuperNodes/🐧 WanSCAILToVideo (Latent Masked)
ComfyUI Node

🐧 WanSCAILToVideo (Latent Masked)

WanSCAILToVideo with optional original_frames/original_frame_masks inputs. White mask areas are hard-preserved from the original video in the latent instead of trusting the model to recreate them. The mask is snapped to the transformer token grid, with frame_mask_grow to shift the boundary.

By sonnyboxΒ·Created 10 months agoΒ·Updated 26 days agoΒ· 7
🐧 WanSCAILToVideo (Latent Masked)
  • positive
  • negative
  • vae
  • pose_video
  • pose_video_mask
  • reference_image
  • reference_image_mask
  • clip_vision_output
  • previous_frames
  • original_frames
  • original_frame_masks
  • positive
  • negative
  • latent
  • video_frame_offset
β—„width512β–Ί
β—„height896β–Ί
β—„length81β–Ί
β—„batch_size1β–Ί
β—„pose_strength1.00β–Ί
β—„pose_start0.00β–Ί
β—„pose_end1.00β–Ί
β—„video_frame_offset0β–Ί
β—„previous_frame_count5β–Ί
β—„replacement_modefalseβ–Ί
β—„enable_latent_masktrueβ–Ί
β—„frame_mask_grow0β–Ί
CategorySuperNodes/Video

Inputs (23)

NameTypeDefaultDescription
positiveCONDITIONINGβ€”
negativeCONDITIONINGβ€”
vaeVAEβ€”
widthINT51232–16384β€”
heightINT89632–16384β€”
lengthINT811–16384β€”
batch_sizeINT11–4096β€”
pose_strengthFLOAT1.000–10Strength of the pose latent.
pose_startFLOAT0.000–1Start step of the pose conditioning.
pose_endFLOAT1.000–1End step of the pose conditioning.
video_frame_offsetINT00–16384Cumulative output frame this chunk begins at. Wire from the previous chunk's video_frame_offset output.
previous_frame_countINT51–16384Tail frames of previous_frames to anchor. SCAIL-2 trained at 5 (81-frame chunks, 76-frame step).
pose_videooptIMAGEVideo used for pose conditioning. Will be downscaled to half the resolution of the main video.
pose_video_maskoptIMAGESCAIL-2 only. Colored per-identity SAM3 mask video at the same resolution as pose_video.
replacement_modeoptBOOLEANfalseSCAIL-2 only. False = Animation Mode (pose_video_mask should have black background). True = Replacement Mode (pose_video_mask should have white background).
reference_imageoptIMAGEReference image. The first image is the primary reference (composite all identities onto it). SCAIL-2: extra batch images are used as additional views (back view, close-up, occluded background), each needing a matching reference_image_mask in that identity's color.
reference_image_maskoptIMAGESCAIL-2 only. Colored reference mask, batch matching reference_image (first = primary reference mask, rest = identity masks for the additional reference_image).
clip_vision_outputoptCLIP_VISION_OUTPUTCLIP vision features for conditioning. Model is trained with stretch resize to aspect ratio.
previous_framesoptIMAGESCAIL-2 only. Full decoded output of the previous chunk. Only the last previous_frame_count are used as the extension anchor.
enable_latent_maskoptBOOLEANtrueToggle the original-frame preservation feature. Off = original_frames/original_frame_masks are ignored entirely and the node behaves exactly like stock WanSCAILToVideo.
original_framesoptIMAGEOriginal video frames at the output resolution. Areas covered by original_frame_masks are encoded into the latent and locked so the sampler preserves them exactly. Offset by video_frame_offset like pose_video. Ignored if original_frame_masks is not connected.
original_frame_masksoptMASKPer-frame masks matching original_frames (a single mask is broadcast to all frames). White (1.0) = hard-preserve the original video content, black (0.0) = generate normally. Snapped outward to the 16 px token grid. Ignored if original_frames is not connected.
frame_mask_growoptINT0-16–16Shift the preserve boundary by this many latent cells (8 px each) after token-grid snapping. Positive = dilate into generated territory (blending never touches the area you masked). Negative = erode into preserved territory (the model recreates the boundary strip, sacrificing some original content for a more seamless transition).

Outputs (4)

NameTypeDescription
positiveCONDITIONINGβ€”
negativeCONDITIONINGβ€”
latentLATENTLatent of the generation size. Contains the encoded original frames (with matching noise mask) where original_frame_masks preserves them; empty elsewhere.
video_frame_offsetINTAdjusted offset + length. Wire into the next chunk.