mcp server
kawarimi-local-character-swap
Free open-source local AI character swap for video on Windows and Linux. Wan 2.2 Animate on your own NVIDIA GPU through ComfyUI, prep in Rust and ONNX Runtime (EdgeTAM, RT-DETRv2, BiRefNet). No cloud,
Set up
Runs on your computer. Pick your agent and operating system.
This project does not publish an install method we can turn into a config. Follow the README instead.
README
synced Oct 29, 2026Kawarimi
Local AI character swap for video, on Windows and Linux.
Replace a person in any clip with a character from one image. The camera, the moves and the timing stay; the person changes. Prep, prompt and render all run on your own NVIDIA GPU: no account, no cloud, no per-video cost.
Install · Quick start · How it works · Agents · Requirements · Build
Kawarimi (変わり身の術) is the substitution technique. It is the Windows and Linux sibling of Swapjutsu for macOS, rebuilt around open models that run on your own card.
Install
There is no release yet: the first prerelease is being checked on clean Windows and Linux machines. Until it is out, build from source. The release will hold these files, on the Releases page:
| System | File | Install |
|---|---|---|
| Windows 10/11 | …_x64-setup.exe | Run it |
| Ubuntu, Debian | …_amd64.deb | sudo apt install ./<file>.deb |
| Any Linux | …_amd64.AppImage | chmod +x <file>.AppImage and run it |
Models are not bundled: they download from Settings when you ask for them, each pinned to an exact revision and checked against its SHA-256.
Quick start
- Download the tools. In Settings, download FFmpeg, the CUDA runtime and the prep models, then install ComfyUI and the Wan weights for your card.
- Prepare a clip. In Create, drop a 4–30 s video and pick who to replace. Fix a mask with + and − points if needed.
- Add a character. Drop one image; Kawarimi cuts it off its background.
- Write the prompt, or let the optional local LLM write it.
- Render a draft, then the final. Results land in Library with the original sound.
How it works
| Step | Model | |
|---|---|---|
| 1 | Normalise the clip | FFmpeg |
| 2 | Find the cuts | TransNetV2 |
| 3 | Find the people | RT-DETRv2 |
| 4 | Track the person through every shot | EdgeTAM, SAM 2.1 tiny |
| 5 | Match the same person across cuts | appearance |
| 6 | Cut out the character | BiRefNet |
| 7 | Write the prompt (optional) | Qwen3.5-9B on llama.cpp |
| 8 | Render | Wan 2.2 Animate on ComfyUI |
| 9 | Put the original sound back | FFmpeg |
Prep is Rust and ONNX Runtime on CUDA; the tracker is its own crate, edgetam-onnx. Rendering runs on a ComfyUI the app installs and manages, or on your own ComfyUI elsewhere (Settings › ComfyUI). Details: PREP, tracking, RENDER.
Agents
kawarimi-mcp is an MCP server: Claude Code or any MCP client can prepare clips, cut out characters and queue
renders, within daily limits you set.
cargo build --release -p kawarimi-mcp
claude mcp add kawarimi -- ./target/release/kawarimi-mcp
Tools and limits: docs/MCP.md.
Requirements
- Windows 10/11 or Linux, x86_64
- NVIDIA GPU with a current driver (CUDA 13; Linux: driver 580+). 12 GB of VRAM or more recommended for rendering.
- About 22 GB of disk for models and ComfyUI
Privacy
No account, no telemetry. Nothing downloads until you ask, and nothing you prepare or render leaves the computer.
Build from source
Needs Rust, Node 24 with pnpm, and on Linux libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf.
pnpm install
pnpm tauri dev
cargo test --workspace
Installers: docs/RELEASE.md.
Related
- Swapjutsu: the same character swap for Mac, no watermark
- edgetam-onnx: the EdgeTAM tracker Kawarimi runs on, in Rust on ONNX Runtime CUDA
- edgetam-coreml: the same tracker in Core ML on the Apple Neural Engine
- Jutsu Studio: the open-source Higgsfield desktop app for Mac
- Content Factory: open-source faceless video generator for Shorts, TikTok and Reels
- AI video API prices: what one second of AI video costs at 30+ providers, updated daily
License
MIT. Models keep their own licenses, listed in Settings and in the manifest; the font Barlow Condensed is under the SIL OFL 1.1.