# Wan Scail Replacement

SCAIL-2 in-video character replacement on WAN 2.1.

- Repository: https://github.com/artokun/comfyui-mcp (883 stars)
- Category: Media
- License: MIT
- Last updated: 2026-10-26
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add artokun/comfyui-mcp --skill wan-scail-replacement -g -a claude-code -y`
Codex: `npx skills add artokun/comfyui-mcp --skill wan-scail-replacement -g -a codex -y`
Cursor: `npx skills add artokun/comfyui-mcp --skill wan-scail-replacement -g -a cursor -y`
Gemini CLI: `npx skills add artokun/comfyui-mcp --skill wan-scail-replacement -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add artokun/comfyui-mcp`

## Description

SCAIL-2 in-video character replacement on WAN 2.1. WanSCAILToVideo + SCAIL2ColoredMask + SAM3, the reference-image framing→scale rule, and the tuning/compositing pitfalls

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# SCAIL-2 In-Video Character Replacement (WAN 2.1)

SCAIL-2 (zai-org, on WAN 2.1 14B) replaces the person in a driving video with a
character you supply as a reference image, end-to-end, with no pose maps, and
with multi-character support. It is the successor to WAN Animate / motion
transfer for the "swap the subject, keep the motion" job. The official ComfyUI
template is `video_wan21_scail2_character_replacement_int8`, built around
`WanSCAILToVideo` (+ `SCAIL2ColoredMask`) with a SAM3 mask driving where the
character goes.

This skill documents the non-obvious behaviours that cost a full multi-minute
render to discover. It is not a from-scratch graph. Start from the official
template and apply the guidance below.

## The one rule that costs a re-render: reference framing controls SCALE

**In `replacement_mode: true`, the reference image's FRAMING controls the output
character's SIZE as well as its appearance.** The SAM3 mask controls where the
character is placed; the reference image controls how large.

Measured on a 720x1280 driving clip where the subject occupied ~30% of frame
height (subject bbox 363 px):

| Reference framing | Person bbox in output | vs driving subject |
|---|---|---|
| Full-bleed portrait (person ~93% of frame) | 621 px | **1.71x oversized** |
| Reframed (person ~34% of frame) | 364 px | **1.003x, correct** |

After reframing, top/bottom registration matched the driving subject within 1 px
(the character stands on the same ground plane at the same height). Pose transfer
was correct in both cases. Only the scale was wrong, which makes it easy to
misread as "the model works" until you A/B against the source.

Guidance: pad or reframe the reference before you render.

The rest: https://github.com/artokun/comfyui-mcp/blob/HEAD/plugin/skills/wan-scail-replacement/SKILL.md
