SCAIL-2 Head Track Crop
Crop a stable head video for SCAIL-2's face-detail pass
- full_body_video
- head_masks
- sam_model
- head_conditioning
- face_crop_video
- crop_masks
- crop_manifest
- debug_preview
SCAIL-2's known weakness is faces. Full-body clips come out of the model with faces that wander, soften, and drift between chunks, and there's no workflow setting that fully fixes it - that's a model limit, not a config problem. What people actually do is run a second pass: crop a stable face-region video from the generated full-body frames, run SCAIL-2 again on that crop with a high-res face reference, then paste the refined face back. SCAIL-2 Head Track Crop is the node that makes the first half of that possible, and it's the opening act of the pack's face-detail workflow.
You feed it full_body_video (the frames from either scheduler) and it produces a square, face-centered crop video as face_crop_video, plus crop_masks (the original face/head mask cropped into that square) and crop_manifest (a JSON string recording where each frame's square sits in the full-body frame - this feeds the composite-back node later). The output crop_manifest is the critical piece: it's the receipt that lets SCAIL-2 Face Composite Back paste the refined crop back in exactly the right place.
How it decides what's the head: it first tries to extract a SAM3 face/head mask from head_conditioning (SAM3 track data), and if your ComfyUI build exposes that, connect sam_model and head_conditioning and it will follow the face. Otherwise it falls back to a plain head_masks MASK input. The README is blunt about the tradeoff: the SAM or input mask is treated as the source of truth. If it returns a face mask, the crop follows the face; if it returns an upper-body mask, the crop exposes that problem instead of hiding it - so a sloppy upstream mask gives you a sloppy crop, on purpose, so you notice. There's no SCAIL colored-mask fallback here and no estimating a head box from a body mask.
The crop placement is controlled by crop_mode. center_follow (default) keeps the crop size fixed from the first tracked frame and follows the face center frame by frame - right for a moving head. fixed_canvas computes the smallest padded square covering the whole tracked head region and reuses that one fixed bbox every frame - right when the second pass should refine a stable local camera region while the head moves inside it. crop_padding_ratio (default 0.45) is how much padding you want around the face; for full-body 9:16 video the README suggests starting around 0.35–0.5. square_align keeps the square side on an alignment boundary - keep it at 32 for SCAIL-2 passes so the second scheduler can use the crop resolution exactly (on a 720-wide source the largest aligned crop is 704, and using that directly beats silently flooring 720 down).
temporal_smoothing (0.6 default) steadies the tracking box across frames, mask_expand_px and mask_blur_px grow and soften the mask, and the SAM controls (sam_detection_threshold, sam_max_objects, sam_detect_interval) tune the internal detection. mask_component_mode defaults to largest, keeping only the largest connected mask region per frame so small body fragments don't balloon the crop; switch to all only when you need to inspect the raw mask exactly as SAM produced it.
Install is the pack standard: ComfyUI Manager search comfyui_scail2_multi_cond, or git clone https://github.com/TTPlanetPig/comfyui_scail2_multi_cond into ComfyUI/custom_nodes, restart, and hard-refresh if the dynamic UI is missing. No extra model downloads for the crop node itself - the SAM3 model is whatever your ComfyUI already uses for tracking.
The two-stage face workflow this slots into is: full-body pass → this node → second SCAIL-2 pass on the crop with an aligned high-res face reference → SCAIL-2 Face Composite Back → video combine. If you're doing it by hand, this node is the part that stops the crop from jittering and keeps the paste-back coordinates honest. It's a fiddly little pipeline, but it's the only real answer to SCAIL-2's face problem that doesn't involve giving up on long clips.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| full_body_video | IMAGE | — | |
| crop_padding_ratio | FLOAT | 0.450–3 | — |
| square_align | INT | 321–256 | — |
| temporal_smoothing | FLOAT | 0.600–0.98 | — |
| mask_expand_px | INT | 80–128 | — |
| mask_blur_px | INT | 40–64 | — |
| sam_detection_threshold | FLOAT | 0.500–1 | — |
| sam_max_objects | INT | 11–8 | — |
| sam_detect_interval | INT | 21–999 | — |
| crop_mode | COMBO | center_follow | 2 options: center_follow, fixed_canvas |
| mask_component_mode | COMBO | largest | 2 options: largest, all |
| head_masksopt | MASK | — | |
| sam_modelopt | MODEL | — | |
| head_conditioningopt | CONDITIONING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| face_crop_video | IMAGE | — |
| crop_masks | MASK | — |
| crop_manifest | STRING | — |
| debug_preview | IMAGE | — |