Loading...
Loading...
通过`runcomfy` CLI在RunComfy上实现跨视频帧的区域编辑——移除出现在多帧中的物体、清理线缆或水印、用匹配的动态效果替换指定区域。该功能可对接Wan 2-7 edit-video(默认选项,基于空间语言的提示词驱动型区域编辑)、Lucy Edit Restyle(保持主体特征的区域重编辑)以及Seedream 4-0 edit-sequential(将视频视为帧堆栈处理时使用)。根据编辑需求是文本提示驱动、需保持主体特征,还是需要逐帧静态修复并串联成视频,自动选择合适的处理路径。当收到“video inpaint”“video inpainting”“remove from video”“mask region in video”“clean up video”“remove object from clip”“video patch”“frame-by-frame edit”“remove watermark from video”“remove passing person”等关键词,或任何明确要求跨视频帧编辑区域的请求时触发。
npx skill4agent add prime-skills/runcomfy-agent-skills video-inpainting# 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": "..."}' \
--output-dir ./outruncomfy-cliwan-ai/wan-2-7/edit-videoWan 2-7的视频编辑端点。通过提示词+源视频实现逐帧编辑。 适用场景:“移除右下角的水印”、“将天空替换为日落”——无需明确掩码的提示词驱动型区域编辑需求。 不适用场景:精确到像素级的区域定位——建议使用ComfyUI工作流。
decart/lucy-edit/restyle保持主体特征的视频重编辑工具,支持区域感知编辑。 适用场景:需要跨帧跟踪的轻量级服装/物体替换。 不适用场景:基于掩码的精准修复——建议使用ComfyUI工作流。
bytedance/seedream-4-0/edit-sequential序列静态编辑——将帧序列作为输入,对每帧应用相同的编辑指令,适用于将视频视为帧堆栈处理的场景。 适用场景:短时长、低帧率的序列,每帧可独立编辑,再通过其他工具重新编码为视频。 不适用场景:长视频、需要动态连贯填充的场景——时间一致性会下降。
wan-ai/wan-2-7/edit-videoruncomfy run wan-ai/wan-2-7/edit-video \
--input '{
"video_url": "https://your-cdn.example/source.mp4",
"prompt": "Remove the watermark in the bottom-right corner across all frames. Preserve all other content exactly. Match background where the watermark was."
}' \
--output-dir ./out"bottom-right corner""the cables overhead""the second person from the left""Preserve all other content exactly"video-edit| 需求 | 工作流类别 |
|---|---|
| LTX 2-3视频修复(目标帧编辑) | |
| Flux静态修复——逐帧串联 | |
| Flux ControlNet修复 | |
| Wan 2-2视频编辑(包含修复的全面视频编辑) | 在comfyui-workflows中搜索"wan 2-2 edit" |
"remove the person walking in the background, fill with matching environment"image-inpaintingvideo-outpaintingvideo-editwan-models| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 64 | CLI参数错误 |
| 65 | 输入JSON错误/ schema不匹配 |
| 69 | 上游服务5xx错误 |
| 75 | 可重试:超时/429限流 |
| 77 | 未登录或令牌被拒绝 |
--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-editimage-inpaintingvideo-outpaintingai-video-generation