Static character reference + unrelated mechanical motion driver -> the character performs the driver's dance. Two workflows, both with the SAM2 points, prompts, seed, and frame caps already set:
motion-transfer-v4.1.json— 77-frame short test (the original)motion-transfer-v4.2-long-305f.json— 305 frames @ 16 fps (~19 s), the long-form version. Verified: no visible seam at any of the three 77-frame window boundaries (frames 76/77, 152/153, 228/229).
V4.1 workflow (revision-pinned raw URL): https://gist.githubusercontent.com/yangdafish/36bbe0d3277cd66875eee1b2215ee95b/raw/eb3a7addecbe8f7279208339b06d85e156fc9143/motion-transfer-v4.1.json SHA-256: 10f6aa9044bfd8b37420ec9228dfd292d947e117e64b32628ba6e302dd787f7c
V4.2 long workflow (revision-pinned raw URL): https://gist.githubusercontent.com/yangdafish/36bbe0d3277cd66875eee1b2215ee95b/raw/93dc811ac8c638a3e84edf42bb9aef3f969372a9/motion-transfer-v4.2-long-305f.json SHA-256: 505518ca8d3cac99a3ae60a675809a751374f3142120b16f567229306dc6345f
-
Drag either JSON onto the ComfyUI canvas.
-
Install the custom nodes and models at the exact revisions in
REVISIONS.md(results drift on other revisions; the workflows' embedded node versions match that list). -
Reference image: one full-body character whose garment/body silhouette is reasonably close to the driver's (fitted outfits work; wide skirts or flowing garments against this narrow-legged driver get reinterpreted — see limits). Name it to match the LoadImage node in the workflow you loaded (v4.1:
reference_v4_fitted.png; v4.2:motion-transfer-robot-ballerina-fitted-reference-v4.png) or just repoint the node. -
Driver video: Pixabay clip 168502 (https://pixabay.com/videos/robot-dance-fun-168502/). Pixabay's license permits use but not redistributing the clip, so you pull it yourself.
Short (77f, for v4.1):
ffmpeg -ss 14 -t 4.8125 -i SOURCE.mp4 \ -vf 'fps=16,crop=1400:2160:1220:0,scale=576:889:flags=lanczos,pad=576:1024:0:67:black' \ -frames:v 77 -an driver_pixabay_168502_trimmed_77f.mp4Long (305f, for v4.2):
ffmpeg -ss 4.9375 -t 19.0625 -i SOURCE.mp4 \ -vf 'fps=16,crop=1400:2160:1220:0,scale=576:889:flags=lanczos,pad=576:1024:0:67:black' \ -frames:v 305 -an driver_pixabay_168502_long_305f.mp4 -
Preflight before sampling. Select the node titled "SAM2 MASK PREFLIGHT — RUN THIS FIRST" (node 75) and use ComfyUI's Partial Execution to run just that output (in recent frontends: select the node and hit the partial-run control, or right-click -> run branch). It renders the SAM2 removal mask over every frame without touching the sampler. Check it frame by frame: the NINE POSITIVE points must sit on the driver's body — if any land on the background, SAM2 keeps the driver and your render is wasted. The FOUR NEGATIVE corner points are intentional background guards; they belong off the subject. Only when the driver is fully masked on every frame, run "FINAL RENDER — RUN AFTER PREFLIGHT" (node 30).
- Wan 2.2 Animate renders in 77-frame context windows chained as 77 + 76 per extension. Pick a total of 77 + 76×k frames (154, 230, 305, ...) so the final window isn't padded. 305 = 77 + 76×3.
- The v4.2 file ships with tiled VAE decode enabled — needed to fit a 305-frame decode on a 48GB card.
- The SAM2 points in each file are placed for that file's driver trim (different start time = different framing). If you change the trim, re-place the points and re-run the preflight.
- After rendering, check the frames on both sides of each window boundary (76/77, 152/153, 228/229) for seams before calling it done.
- Verified to 4 chained windows (305 frames). Beyond that is untested.
- The long driver's first ~3 seconds inherit a push-in from the source camera — it carries into the output.
- Mask preflight is manual.
- Silhouette mismatch is the second failure mode: a wide romantic tutu collapsed into a rigid tunic until we matched the target's silhouette to the driver. Pick silhouette-compatible references.
- Minor rear-angle shift in the character's hip understructure (observed on the 77f short).
- Rendering needs a ~48GB GPU (or aggressive offloading). The 305-frame render took ~19 minutes on an A6000.
Disclosure: I build ModelPilot (modelpilot.ai). This gist is the complete, free-to-download workflow — nothing gated.