$npx -y skills add prime-skills/runcomfy-agent-skills --skill video-outpaintingVideo outpainting on RunComfy via the runcomfy CLI — extend the spatial canvas of a video, change aspect ratio (9:16 vertical to 16:9 horizontal or vice versa), add environment beyond the original frame while preserving the central action. Routes prompt-shaped spatial extension
| 1 | # Video Outpainting |
| 2 | |
| 3 | Extend a video's spatial canvas — uncrop vertically or horizontally, change aspect ratio while preserving the central action. This skill routes spatial extension through Wan 2-7 edit-video for prompt-shaped canvas changes, and points the agent at dedicated ComfyUI outpaint workflows when hero-grade seam quality matters. |
| 4 | |
| 5 | [runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-outpainting) · [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-outpainting) · [CLI docs](https://docs.runcomfy.com/cli/introduction?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-outpainting) |
| 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. Spatially extend a video (closest CLI-reachable approach) |
| 17 | runcomfy run wan-ai/wan-2-7/edit-video \ |
| 18 | --input '{"video_url": "...", "prompt": "...extend canvas..."}' \ |
| 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 | **Wan 2-7 Edit-Video** — `wan-ai/wan-2-7/edit-video` *(default)* |
| 29 | > Prompt-driven video edit; accepts spatial extension language ("extend the canvas to 16:9 by adding matching environment on the left and right"). Wide enough quality for social and most internal uses. |
| 30 | > Pick for: aspect-ratio swap (vertical ↔ horizontal), social-cuts, uncrop where seam quality is acceptable. |
| 31 | > Avoid for: hero ad delivery with strict seam-quality requirements — use a ComfyUI outpainting workflow. |
| 32 | |
| 33 | For broader video edit see [`video-edit`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/video-edit). |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | ## Route 1: Wan 2-7 Edit-Video — closest CLI path |
| 38 | |
| 39 | **Model**: `wan-ai/wan-2-7/edit-video` |
| 40 | **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-outpainting) |
| 41 | |
| 42 | ### Invoke |
| 43 | |
| 44 | **Aspect-ratio swap (9:16 vertical → 16:9 horizontal):** |
| 45 | |
| 46 | ```bash |
| 47 | runcomfy run wan-ai/wan-2-7/edit-video \ |
| 48 | --input '{ |
| 49 | "video_url": "https://your-cdn.example/vertical-clip.mp4", |
| 50 | "prompt": "Extend the canvas to 16:9 horizontal by adding matching environment on the left and right sides. Continue the existing background style, lighting, and camera distance throughout the clip. Preserve the original action and subject framing in the center." |
| 51 | }' \ |
| 52 | --output-dir ./out |
| 53 | ``` |
| 54 | |
| 55 | ### Prompting tips |
| 56 | |
| 57 | - **Lead with the canvas change**: `"Extend the canvas to 16:9"`, `"Extend downward to show more ground"`, `"Add environment on the left and right by ~30% each"`. |
| 58 | - **Describe what extends**: same background style, same lighting, same depth of field, same camera distance. |
| 59 | - **End with preservation**: `"Preserve the original action and subject framing in the center"` — without this Wan may restyle the central content. |
| 60 | - **Expect quality variance at the seam.** Wan 2-7 wasn't trained specifically for outpaint; for hero delivery use a ComfyUI workflow. |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | ## When you need hero-grade seam quality |
| 65 | |
| 66 | The endpoint above handles aspect-ratio swap well for most uses. For spatial frame expansion with strict temporal consistency, seam handling, and motion-aware fill, RunComfy hosts dedicated ComfyUI workflows: |
| 67 | |
| 68 | | Workflow | What | |
| 69 | |---|---| |
| 70 | | [LTX 2-3 outpainting in ComfyUI — spatial frame expansion](https://www.runcomfy.com/comfyui-workflows/ltx-2-3-outpainting-in-comfyui-spatial-frame-expansion-workflow?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-outpainting) | Dedicated video outpainting workflow using LTX 2-3 | |
| 71 | | Browse [comfyui-workflows](https://www.runcomfy.com/comfyui-workflows?utm_source=skills.sh&utm_medium=skill&utm_campaign=video-outpainting) for "outpaint" | Additional video outpainting graphs from the community | |
| 72 | |
| 73 | These are GUI workflows, not CLI endpoints. The CLI can't reach them — open them in the RunCo |