SCAIL Pose Frames
Build the looped, inpaint-ready driving video SCAIL wants
- frames
- frames
- total_frames
- overlap_frames
- shift
SCAIL-2, Z.ai's motion-transfer model built on Wan 2.1, can do something most driving-video pipelines can't: loop and inpaint sections of a driving sequence rather than just playing it straight through once. The catch is that SCAIL's own workflow expects that driving sequence built a very specific way - a chunk from the end of your clip, a run of blank frames in the middle, a chunk from the start, plus frame counts that respect Wan's own n×4+1 requirement (the Wan VAE compresses time roughly 4x, so only counts like 1, 5, 9, 13... decode back out cleanly). Building that by hand means slicing frames, padding with black, and getting overlap right so the seams don't judder. SCAIL Pose Frames does all of it in one node.
How it works
The pack ships real tooltips on this one, so here's the mechanism straight from the source rather than guesswork:
blank_framesplaces black inpaint frames in the middle of the loop. Looping and inpainting only actually happen once this is greater than 1 - and once it is, the value has to be WAN-valid:1 + n×4(1, 5, 9, 13, and so on).frame_overlap, when enabled, prepends the two frames immediately before the split point and appends the two immediately after it. Those overlap frames give WAN smooth temporal context right at both seam edges, which improves loop smoothness - the total output grows by 4 frames when this is on.
The inputs and outputs that matter
frames- your source pose or driving sequence.blank_frames(default 5) - inpaint frame count, WAN-valid above 1.frame_overlap(default true, boolean) - adds 2+2 context frames at the seams.
Four outputs, all tooltipped:
frames- the looped sequence:[end portion] + [blank frames] + [start portion], with overlap frames if enabled. Feed this into SCAIL as the pose video.total_frames- the actual frame count after any trimming needed to stay WAN-valid.overlap_frames- 0 or 4, depending onframe_overlap.shift- how far to rotate the sequence left to put your original frame 1 back at position 1 (end-portion length plusblank_frames). This is exactly the value the sibling Shift Image Batch node in this same pack takes as itsamountinput - build the loop here, run SCAIL, then unwind the rotation there.
How to install it
Search "Link Comfy Nodes" in ComfyUI Manager and install from there. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Mister-Link/link-comfy-nodes
pip install -r link-comfy-nodes/requirements.txt
Restart ComfyUI. This node has no extra model dependencies of its own - it's frame arithmetic, not inference. SCAIL-2 itself is a separate, large download (ComfyUI core support ships via a recent core PR; expect a multi-gigabyte weight download the first time you run it, and check Comfy-Org/SCAIL-2 for the scaled weights rather than the much larger raw repo).
Common issues & troubleshooting
blank_frames not landing on a valid count. The tooltip is explicit: values above 1 must be 1 + n×4. If your loop or inpaint behavior isn't kicking in the way you expect, check whether your value is actually on that pattern (1, 5, 9, 13, 17...) rather than an arbitrary number.
Skipping the shift output. If you don't route shift into something that unwinds the rotation on the other end (Shift Image Batch's amount input is built for exactly this), your final sequence stays offset relative to your original clip - the classic "why does my output start on the wrong frame" symptom.
This is a deep-cut, workflow-specific node. If you're not already doing SCAIL-driven loop or inpaint work, you almost certainly don't need this - it exists to solve one specific, fiddly arithmetic problem for one specific model's workflow.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | — | |
| blank_frames | INT | 50–9999 | Number of black inpaint frames placed in the middle of the loop. Looping/inpainting only applies when this is greater than 1. For values above 1, it must be WAN-valid: 1+n*4 (1, 5, 9, 13, ...). |
| frame_overlap | BOOLEAN | true | When enabled, prepends the 2 frames immediately before the split point and appends the 2 frames immediately after it. These overlap frames give WAN smooth temporal context at both seam edges, which can improve loop smoothness. The total output will be total_frames + 4 when enabled. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | Looped frame sequence ready for WAN SCAIL: [end portion] + [blank frames] + [start portion], with optional overlap frames prepended/appended. Feed this into SCAIL as the pose video. |
| total_frames | INT | Actual total frame count of frames after trimming the source frames to keep the output WAN-valid. |
| overlap_frames | INT | Number of overlap frames added (0 when frame_overlap is off, 4 when on). |
| shift | INT | Amount to rotate the (overlap-trimmed) sequence left by to put original frame 1 back at position 1: end_portion length + blank_frames. |