Loading...
Loading...
通过`runcomfy` CLI在RunComfy上实现视频扩图——扩展视频的空间画布,更改画幅比例(从9:16竖屏转为16:9横屏,或反之),在保留核心动作的同时为原始画面添加周边环境。对于由提示词驱动的空间扩展,将通过Wan 2-7 edit-video进行处理;若用于重要内容交付且对拼接质量有要求,则会引导Agent使用专用的ComfyUI扩图工作流。当出现“video outpaint”“video outpainting”“extend video canvas”“expand video frame”“uncrop video”“aspect ratio change”“vertical to horizontal video”“16:9 from 9:16”“TikTok to YouTube”等关键词,或任何明确要求扩展视频空间画布的请求时,将触发该功能。
npx skill4agent add prime-skills/runcomfy-agent-skills video-outpainting# 1. 安装(详情请查看runcomfy-cli技能)
npm i -g @runcomfy/cli # 或:npx -y @runcomfy/cli --version
# 2. 登录
runcomfy login # 或在CI环境中:export RUNCOMFY_TOKEN=<token>
# 3. 空间扩展视频(最便捷的CLI调用方式)
runcomfy run wan-ai/wan-2-7/edit-video \
--input '{"video_url": "...", "prompt": "...extend canvas..."}' \
--output-dir ./outruncomfy-cliwan-ai/wan-2-7/edit-video由提示词驱动的视频编辑;支持空间扩展相关描述(如“将画布扩展为16:9,在左右两侧添加匹配的环境”)。画质足以满足社交平台及大多数内部使用场景。 适用场景:画幅比例转换(竖屏↔横屏)、社交平台剪辑、对拼接质量要求不高的画面扩展。 不适用场景:对拼接质量有严格要求的重要广告内容交付——请使用ComfyUI扩图工作流。
video-editwan-ai/wan-2-7/edit-videoruncomfy run wan-ai/wan-2-7/edit-video \
--input '{
"video_url": "https://your-cdn.example/vertical-clip.mp4",
"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."
}' \
--output-dir ./out"Extend the canvas to 16:9""向下扩展以展示更多地面""在左右两侧各扩展约30%的环境""保留画面中心的原始动作和主体构图"| 工作流 | 说明 |
|---|---|
| LTX 2-3 outpainting in ComfyUI — spatial frame expansion | 基于LTX 2-3的专用视频扩图工作流 |
| 在comfyui-workflows中搜索“outpaint” | 社区提供的其他视频扩图工作流 |
image-outpaintingvideo-extendvideo-inpaintingwan-models| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 64 | CLI参数错误 |
| 65 | 输入JSON错误/ schema不匹配 |
| 69 | 上游服务5xx错误 |
| 75 | 可重试:超时/429错误 |
| 77 | 未登录或令牌被拒绝 |
runcomfy run--output-dirnpm i -g @runcomfy/clinpx -y @runcomfy/cliruncomfy login~/.config/runcomfy/token.jsonRUNCOMFY_TOKEN--inputmodel-api.runcomfy.net*.runcomfy.net*.runcomfy.comBash(runcomfy *)runcomfy-clivideo-editvideo-extendvideo-inpaintingimage-outpainting