Wan - Animate Replace
Swap the person in a shot and keep the performance
- video_url
- image_url
- video
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
Animate Replace is character replacement: you keep the footage - the blocking, the timing, the lighting, the delivery - and change who's in it. Wan Animate is Alibaba's first-party model for this, part of the Animate-14B family that stayed Apache 2.0, and KIE serves it as a hosted endpoint with two sockets on the ComfyUI side.
It's the same file as Animate Move and a different job. Move takes motion from one body and gives it to another. Replace takes a performance and re-casts it. If you shot a take with a stand-in, or you're putting a consistent character into existing footage without re-shooting, this is the node.
Expect it to be good at faces, wardrobe, and general build, and imperfect at hands and fast occlusion - replacement models inherit every weakness of the source footage, and blurry source makes for blurry swapped-in people.
How it works
video_url (VIDEO) and image_url (IMAGE) are both required, and there's no prompt field to fight with. The node materialises your video to a temporary MP4, uploads it plus the reference image to KIE, POSTs to /api/v1/jobs/createTask with marketplace model wan/2-2-animate-replace, then polls /api/v1/jobs/recordInfo until the job finishes.
The result is downloaded and archived under ComfyUI/output/KIE-Results/videos and returned as a native VIDEO object. Your reference image can come straight from earlier in the graph - a LoadImage, an upscale, a face swap, whatever - because the pack handles the upload for you and only the resulting URL goes to KIE.
Inputs that matter
video_url- the footage whose performer you're replacing. Keep the subject reasonably large in frame.image_url- the new character. One clean, front-facing, well-lit shot beats a moody three-quarter profile.resolution-480p(default),580p,720p. Draft low, finish high.nsfw_checker- off by default. KIE's own note on the field is that it can't promise to filter everything.timeout_seconds- 1200 by default;callback_urlempty.
No seed, so a take isn't reproducible by number. Download what you like.
Outputs
video is the one that matters. The rest are for plumbing and bookkeeping: url, all_urls_json, task_id, raw_json, credits_consumed, credits_left. The credits pair doubles as the on-node receipt after each run - the pack prints "Credits spent / Credits left" on the node surface, which is the honest way to watch a replacement job's cost, since these are billed per second of video.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
cd ComfyUI-KIE-Nodes-Next && pip install -r requirements.txt
Restart ComfyUI afterwards. The dependency list is deliberately thin - requests, Pillow, numpy, PyYAML - because nothing runs locally except the HTTP client. You'll find the node under KIE Next / Video / Wan; the pack generates its model nodes from KIE's live API catalog on startup, so new KIE models appear as nodes without waiting for a pack release.
One-time key: Settings → KIE.ai Nodes Next → Connection, paste, and it validates before saving. ✅ CONNECTED plus a masked fingerprint is what success looks like. KIE_API_KEY in the environment is the headless route and takes priority over the saved key. KIE itself is pay-as-you-go credits, not a subscription.
Common issues
Rejection for a video it can't read. If KIE can't find a usable subject it fails the task rather than guessing - check framing before you burn credits.
The swapped face looks pasted on. Lighting mismatch between your reference and the plate. Match the reference's light direction and colour temperature to the footage and it improves more than any setting here will.
Nothing appears in the UI after a good run. This isn't an output node - wire video into a save or preview node.
comfy_api.latest / InputImpl.VideoFromFile error. Your ComfyUI is older than the native VIDEO type. Update it.
Cost surprise on long takes. KIE bills per second at the resolution tier. A 10-second 720p replacement is roughly four times a 480p five-second one - which is exactly why the node shows you the receipt afterwards.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| video_url | VIDEO | — | |
| image_url | IMAGE | — | |
| resolutionopt | COMBO | 480p | Resolution of the generated video (480p, 580p, or 720p). |
| nsfw_checkeropt | BOOLEAN | false | Defaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements. |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |