Nodes/comfyui_scail2_multi_cond/SCAIL-2 Scheduled Long Video (Internal SAM)
ComfyUI Node

SCAIL-2 Scheduled Long Video (Internal SAM)

The SCAIL-2 scheduler that tracks its own masks, at the cost of visibility

By TTPlanetPig·Created 2 months ago·Updated 2 months ago· 143
SCAIL-2 Scheduled Long Video (Internal SAM)
  • model
  • clip
  • vae
  • sampler
  • sigmas
  • clip_vision
  • pose_video
  • sam_model
  • sam_conditioning
  • reference_1
  • reference_2
  • reference_3
  • reference_4
  • reference_5
  • reference_6
  • reference_7
  • reference_8
  • frames
  • used_pose_video_mask
  • used_reference_mask_timeline
  • summary
segment_plan# frames | reference | prompt | negative | boundary_overlap 49 | 1 | first segment prompt | | 5 121 | 2 | second segment prompt | | 5 73 | 3 | third segment prompt | | 5 157 | 4 | fourth segment prompt | | 5
seed1
cfg1.0
modereplacement
max_frames0
max_chunk_frames81
overlap_frames5
reference_count2
color_correctiontrue
object_indices
reference_object_indices
sort_byleft_to_right
sam_detection_threshold0.50
sam_max_objects2
sam_detect_interval2
cache_modedisk

The other scheduler in this pack is the same engine with the mask-building step swallowed whole. SCAIL-2 Scheduled Long Video (Internal SAM) does everything the external-mask version does - same segment plan, same 81-frame chunk loop, same overlap handling, same outputs - but instead of requiring you to run SAM3 tracking and the SCAIL-2 Multi Reference Colored Mask upstream, it runs SAM3 tracking inside the node and builds the colored masks itself. Feed it pose_video, a sam_model, sam_conditioning, and your reference images, and it goes from raw inputs to a scheduled, chunked, multi-reference render in one call. It's the node you reach for when you want the simplest workflow and don't care about fiddling with tracks.

The trade is spelled out in the README and it's the real decision point: with the internal-SAM variant you cannot preview or adjust the SAM tracks before generation. SCAIL-2 generation is expensive - tens of minutes per clip on consumer cards - so a mask that's wrong costs you a full run before you find out. The external-mask scheduler keeps person selection visible and editable; this one is for when you've got a clean single-subject driving video and just want frames out.

The extra inputs over the external scheduler are the SAM controls, and they map to the native SCAIL-2 behavior: object_indices (driving-video object indices after sorting, empty = all), reference_object_indices (reference-image object indices, empty = all - and for single-person references, leave it empty), sort_by (identity color ordering: none, left_to_right, area), plus sam_detection_threshold, sam_max_objects, and sam_detect_interval. The sam_model and sam_conditioning inputs are optional in the schema but required in practice - in replacement mode, which is the default. In animation mode the node skips internal SAM tracking entirely because SCAIL replacement masks aren't used, so sam_model and sam_conditioning genuinely aren't needed there.

The one gotcha the README calls out specifically is a two-person trap: if you set object_indices = 1 to select the second person in the driving video, and your reference image only has one person, do not also filter the reference by 1 - that makes the reference mask empty and your whole reference silently vanishes. Empty reference_object_indices means "all reference objects," and that's what you want for a single-person reference.

Everything else matches the external scheduler: model, clip, vae, sampler, sigmas, clip_vision, pose_video, segment_plan, seed, cfg, mode, max_frames, max_chunk_frames, overlap_frames, reference_count, color_correction, and cache_mode (the same disk cache under output/scail2_cache/long_video). Outputs are frames, used_pose_video_mask, used_reference_mask_timeline, and summary - the mask outputs come back even though you never saw the tracks, which is handy for checking after the fact.

Install is identical to the rest of the pack: ComfyUI Manager search comfyui_scail2_multi_cond, or clone https://github.com/TTPlanetPig/comfyui_scail2_multi_cond into ComfyUI/custom_nodes and restart. No models ship in the pack - you bring the SCAIL-2 weights and the SAM3 model for the internal tracking. The practical tip: keep the external-mask scheduler as your default and reach for this one when the setup is proven. When it works, it's the fastest path from a driving video to a multi-reference SCAIL-2 clip; when it doesn't, you'll wish you'd been able to look at the mask before spending the render.

CategorySCAIL-2/Scheduled

Inputs (33)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
samplerSAMPLER
sigmasSIGMAS
clip_visionCLIP_VISION
pose_videoIMAGE
segment_planSTRING# frames | reference | prompt | negative | boundary_overlap 49 | 1 | first segment prompt | | 5 121 | 2 | second segment prompt | | 5 73 | 3 | third segment prompt | | 5 157 | 4 | fourth segment prompt | | 5
seedINT10–18446744073709550000
cfgFLOAT1.00–20
modeCOMBOreplacement2 options: replacement, animation
max_framesINT00–100000
max_chunk_framesINT8117–81
overlap_framesINT50–33
reference_countINT21–8
color_correctionBOOLEANtrue
object_indicesSTRINGComma-separated driving-video object indices to include after sorting. Empty = all.
reference_object_indicesSTRINGComma-separated reference-image object indices. Empty = all reference objects, recommended for single-person reference images.
sort_byCOMBOleft_to_rightNative SCAIL-2 identity color ordering before object index filtering.
sam_detection_thresholdFLOAT0.500–1
sam_max_objectsINT21–16
sam_detect_intervalINT21–999
cache_modeCOMBOdisk2 options: disk, off
sam_modeloptMODEL
sam_conditioningoptCONDITIONING
reference_1optIMAGE
reference_2optIMAGE
reference_3optIMAGE
reference_4optIMAGE
reference_5optIMAGE
reference_6optIMAGE
reference_7optIMAGE
reference_8optIMAGE

Outputs (4)

NameTypeDescription
framesIMAGE
used_pose_video_maskIMAGE
used_reference_mask_timelineIMAGE
summarySTRING