$npx -y skills add prime-skills/runcomfy-agent-skills --skill video-inpaintingRegion edits across video frames on RunComfy via the runcomfy CLI — remove an object that appears across many frames, clean up wires or watermarks, replace a region with matching motion. Routes across Wan 2-7 edit-video (default, prompt-driven region edits with spatial language
| 1 | # Video Inpainting |
| 2 | |
| 3 | Region edits across video frames — remove an object that appears across many frames, clean up wires or watermarks, replace a region with motion that matches the rest of the clip. This skill routes across the prompt-driven video edit endpoints in the RunComfy catalog and gives the agent a clear default for each intent. |
| 4 | |
| 5 | [runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-inpainting) · [Wan 2-7 edit-video](https://www.runcomfy.com/models/wan-ai/wan-2-7/edit?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-inpainting) · [CLI docs](https://docs.runcomfy.com/cli/introduction?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-inpainting) |
| 6 | |
| 7 | ## Powered by the RunComfy CLI |
| 8 | |
| 9 | ```bash |
| 10 | # 1. Install (see runcomfy-cli skill for details) |
| 11 | npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version |
| 12 | |
| 13 | # 2. Sign in |
| 14 | runcomfy login # or in CI: export RUNCOMFY_TOKEN=<token> |
| 15 | |
| 16 | # 3. Edit a video (closest CLI-reachable approach) |
| 17 | runcomfy run wan-ai/wan-2-7/edit-video \ |
| 18 | --input '{"video_url": "...", "prompt": "..."}' \ |
| 19 | --output-dir ./out |
| 20 | ``` |
| 21 | |
| 22 | CLI deep dive: [`runcomfy-cli`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/runcomfy-cli) skill. |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## Pick the right model |
| 27 | |
| 28 | Routes via prompt-driven region edits — the model resolves the targeted region from spatial language across all frames. |
| 29 | |
| 30 | **Wan 2-7 Edit-Video** — `wan-ai/wan-2-7/edit-video` *(default)* |
| 31 | > Wan 2-7's video edit endpoint. Drive frame-by-frame edits via prompt + the source video. |
| 32 | > Pick for: "remove the watermark in the bottom-right", "replace the sky with a sunset" — prompt-driven region intent without an explicit mask. |
| 33 | > Avoid for: precise pixel-level region targeting — use a ComfyUI workflow. |
| 34 | |
| 35 | **Lucy Edit Restyle** — `decart/lucy-edit/restyle` |
| 36 | > Identity-stable video restyle that handles region-aware edits. |
| 37 | > Pick for: lightweight outfit / object swap that needs to track across frames. |
| 38 | > Avoid for: surgical mask-driven inpaint — ComfyUI workflow. |
| 39 | |
| 40 | **Seedream 4-0 Edit-Sequential** — [`bytedance/seedream-4-0/edit-sequential`](https://www.runcomfy.com/models/bytedance/seedream-4-0/edit-sequential?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-inpainting) |
| 41 | > Sequential still edits — feed a sequence of frames as inputs, apply the same edit instruction across each, useful if you're treating the video as a frame stack. |
| 42 | > Pick for: short, low-frame-rate sequences where each frame can be edited independently and a separate tool re-encodes to video. |
| 43 | > Avoid for: long clips, motion-coherent fills — temporal consistency degrades. |
| 44 | |
| 45 | --- |
| 46 | |
| 47 | ## Route 1: Wan 2-7 Edit-Video — closest CLI path |
| 48 | |
| 49 | **Model**: `wan-ai/wan-2-7/edit-video` |
| 50 | **Catalog**: [Wan 2-7 edit-video](https://www.runcomfy.com/models/wan-ai/wan-2-7/edit?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-inpainting) |
| 51 | |
| 52 | ### Invoke |
| 53 | |
| 54 | ```bash |
| 55 | runcomfy run wan-ai/wan-2-7/edit-video \ |
| 56 | --input '{ |
| 57 | "video_url": "https://your-cdn.example/source.mp4", |
| 58 | "prompt": "Remove the watermark in the bottom-right corner across all frames. Preserve all other content exactly. Match background where the watermark was." |
| 59 | }' \ |
| 60 | --output-dir ./out |
| 61 | ``` |
| 62 | |
| 63 | ### Prompting tips |
| 64 | |
| 65 | - **Describe the region in spatial language** — `"bottom-right corner"`, `"the cables overhead"`, `"the second person from the left"`. |
| 66 | - **Lead with preservation**: `"Preserve all other content exactly"` — without this Wan may restyle frames inadvertently. |
| 67 | - **One change per call.** Compound edits (remove A and replace B) tend to drift; split into sequential edit passes. |
| 68 | |
| 69 | For broader video edit, see [`video-edit`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/video-edit). |
| 70 | |
| 71 | --- |
| 72 | |
| 73 | ## When you need pixel-precise mask propagation |
| 74 | |
| 75 | The endpoints above are prompt-driven — they resolve the target region from spatial language. For pixel-precise mask propagation with SAM2 segmentation tracking + temporal-aware inpaint backfill, Run |