
video-edit
在 RunComfy 上编辑现有视频——此技能是一个智能路由器,根据用户意图匹配 RunComfy 目录中正确的编辑模型。选择 Wan 2.7 Edit-Video(通用重风格/背景替换/包装替换,身份和动作保留)、Kling 2.6 Pro Motion Control(将参考视频的精确动作迁移到目标角色)或 Lucy Edit Restyle(轻量级身份稳定重风格/服装替换)。捆绑每个模型有文档记录的提示模式,使技能获得更精准的编辑,而无需在错误模型上反复尝试。通过本地 RunComfy CLI 调用 `runcomfy run <vendor>/<model>/<endpoint>`。触发词包括“视频编辑”、“编辑视频”、“重风格视频”、“替换视频背景”、“动作控制”、“视频服装替换”或任何明确的视频转换请求。
Edit existing video on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Wan 2.7 Edit-Video (general restyle / background swap / packaging swap, identity + motion preservation), Kling 2.6 Pro Motion Control (transfer precise motion from a reference video to a target character), or Lucy Edit Restyle (lightweight identity-stable restyle / outfit swap). Bundles each model's documented prompting patterns so the skill gets sharper edits without burning iterations on the wrong model. Calls `runcomfy run <vendor>/<model>/<endpoint>` through the local RunComfy CLI. Triggers on "video edit", "edit video", "restyle video", "swap video background", "motion control", "outfit swap video", or any explicit ask to transform a video.
Video Edit — Pro Pack on RunComfy
runcomfy.com · Wan 2.7 Edit-Video · Kling Motion-Control Pro · Lucy Edit Restyle · GitHub
视频编辑,意图路由。 此技能不局限于单一模型——它根据用户的实际需求,从 RunComfy 目录中选择合适的视频编辑模型:通用重风格、参考剪辑的动作迁移,或轻量级身份稳定的服装/背景替换。
npx skills add agentspace-so/runcomfy-skills --skill video-edit -g
根据用户意图选择正确的模型
| 用户意图 | 模型 | 原因 |
|---|---|---|
| 重风格说话人视频——保留面部/姿势/嘴唇动作 | Wan 2.7 Edit-Video | 强大的身份+动作保留;支持高达 1080p |
| 替换产品背景,保持摄像机运动 | Wan 2.7 Edit-Video | 摄像机运动保留;单向编辑得到尊重 |
| 使用参考图像替换包装设计 | Wan 2.7 Edit-Video + reference_image |
参考条件的设计迁移 |
| 应用电影级色彩分级/商业润色 | Wan 2.7 Edit-Video | 擅长单向全局外观变化 |
| 将参考视频的精确动作迁移到目标角色 | Kling 2.6 Pro Motion Control | 专为动作映射设计,同时保持身份 |
| 将目标角色的嘴唇动作与源视频的嘴唇动作同步 | Kling 2.6 Pro Motion Control | 专为紧密的时间一致性构建 |
| 轻量级服装/戏服替换,保留身份 | Lucy Edit Restyle | 核心优势是局部身份稳定编辑 |
| 身份稳定的重风格(“沙漠中的宇航员”、“温暖的金色时刻光线”) | Lucy Edit Restyle | 专注于重风格的时间一致性 |
| 未指定时的默认选择 | Wan 2.7 Edit-Video | 最通用,最高分辨率 |
代理读取此表,分类用户意图,并选择下面匹配的子部分。
前提条件
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy 账户 —
runcomfy login。 - CI/容器 — 设置
RUNCOMFY_TOKEN=<token>。 - 源视频 URL — 格式和限制取决于所选路由。
路由 1:Wan 2.7 Edit-Video — 重风格/背景/包装的默认选择
模型:wan-ai/wan-2-7/edit-video
模式
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
prompt |
string | 是 | — | 以保留目标开头。每次调用一个编辑方向。 |
video |
string | 是 | — | MP4/MOV URL,2–10秒,≤100MB。 |
reference_image |
string | 否 | — | URL — 仅用于直接设计/外观迁移。 |
resolution |
enum | 否 | (输入) | 720p 或 1080p。 |
aspect_ratio |
enum | 否 | (输入) | 宽:高。默认为输入。 |
duration |
int | 否 | 0 | 0 = 匹配输入;2–10 = 从开头截断。 |
audio_setting |
enum | 否 | auto |
auto 或 origin(保留源音频)。 |
seed |
int | 否 | — | 可重现性。 |
调用
背景替换,保留身份,保留音频:
runcomfy run wan-ai/wan-2-7/edit-video \
--input '{
"prompt": "Preserve the speaker'\''s face, pose, and lip movement; change the background to a modern office with neutral lighting.",
"video": "https://.../speaker.mp4",
"audio_setting": "origin"
}' \
--output-dir <absolute/path>
使用参考图像进行包装替换:
runcomfy run wan-ai/wan-2-7/edit-video \
--input '{
"prompt": "Maintain the original framing and hand movement; replace the packaging design using the reference image.",
"video": "https://.../hand-holding-package.mp4",
"reference_image": "https://.../new-packaging.png",
"audio_setting": "origin"
}' \
--output-dir <absolute/path>
提示技巧
- 首先说明保留目标:
"Preserve [face / pose / motion / framing / lip movement]; [then state the change]"。 - 每次调用一个编辑方向。 复合编辑会导致动作漂移。
- 仅在必要时使用
reference_image(包装替换、服装替换且有目标视觉)。通用重风格不要传递参考。 audio_setting: "origin"用于说话人视频,不希望重新生成音轨。- 源视频限制:2–10秒,≤100MB。
路由 2:Kling 2.6 Pro Motion Control — 当需要从参考剪辑迁移动作时
模型:kling/kling-2-6/motion-control-pro
当用户想要将参考视频的动作迁移到目标角色(由图像或另一个视频驱动)时使用。这不是重风格——而是带有身份保持的动作映射。
模式
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
prompt |
string | 是 | 描述目标动作/风格。 |
image |
string | 是(图像方向) | 角色/背景一致性的参考。 |
video |
string | 是 | 动作参考。根据方向为10–30秒。 |
keep_original_sound |
bool | 否 | 保留参考视频的音频。 |
character_orientation |
enum | 是 | image(最大输出10秒)或 video(最大输出30秒)。 |
调用
runcomfy run kling/kling-2-6/motion-control-pro \
--input '{
"prompt": "A young american woman dancing",
"image": "https://.../target-character.jpg",
"video": "https://.../motion-reference-dance.mp4",
"character_orientation": "image",
"keep_original_sound": true
}' \
--output-dir <absolute/path>
提示技巧
- 图像参考中的主体必须占据画面 > 5%,以确保清晰的身份保持。
- 空间约束有帮助:
"character on left side, background motion right"。 - 如果结果在迭代间漂移,简化描述——去掉形容词,保留核心动作描述。
character_orientation: "image"将输出限制为10秒;"video"允许30秒。
路由 3:Lucy Edit Restyle — 轻量级身份稳定重风格/服装替换
模型:decart/lucy-edit/restyle
当编辑是局部风格修改——服装替换、场景重新照明、氛围重风格——且身份保留至关重要时使用。比 Wan 2.7 Edit 更轻量;最高 720p。
模式
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
prompt |
string | 是 | — | 自然语言编辑指令。 |
video_url |
string | 是 | — | MP4/MOV/WEBM/GIF。 |
resolution |
enum | 否 | 720p |
此层级仅支持 720p。 |
调用
服装替换:
runcomfy run decart/lucy-edit/restyle \
--input '{
"prompt": "Change outfit to professional business attire; preserve face and motion.",
"video_url": "https://.../subject-walking.mp4"
}' \
--output-dir <absolute/path>
氛围重风格:
runcomfy run decart/lucy-edit/restyle \
--input '{
"prompt": "Make lighting warm and golden hour; preserve face, pose, and motion.",
"video_url": "https://.../subject-portrait.mp4"
}' \
--output-dir <absolute/path>
提示技巧
- 局部变化措辞更有效。 “服装”、“照明”、“背景”——选择一个类别。
- 保留身份目标——
"preserve face and motion"就足够了;不要过度指定。 - 避免完全替换(“太空中的宇航员”可行;“将主体换成另一个人”不行)。Lucy 专为局部风格修改构建,而非完全角色替换。
- 无宽高比控制——输出匹配输入。如果你不预先匹配,裁剪会在服务端进行。
限制
- 每条路由继承其模型的限制。 Wan 2.7 Edit:2–10秒,最高 1080p。Kling:10秒(图像方向)或30秒(视频方向)。Lucy:最高 720p,无宽高比控制。
- 无多路由混合。 此技能每次调用选择一个模型。
- 品牌特定覆盖——如果用户指定了特定模型,则路由到相应的品牌技能(
wan-2-7)以获得更全面的处理。
退出码
| 码 | 含义 |
|---|---|
| 0 | 成功 |
| 64 | CLI 参数错误 |
| 65 | 输入 JSON 错误/模式不匹配 |
| 69 | 上游 5xx 错误 |
| 75 | 可重试:超时/429 |
| 77 | 未登录或令牌被拒绝 |
完整参考:docs.runcomfy.com/cli/troubleshooting。
工作原理
该技能根据用户意图选择 Wan 2.7 Edit-Video / Kling 2.6 Pro Motion Control / Lucy Edit Restyle 之一,并使用匹配的 JSON 主体调用 runcomfy run <model_id>。CLI 向模型 API 发送 POST 请求,轮询请求,获取结果,并将任何 .runcomfy.net/.runcomfy.com URL 下载到 --output-dir。Ctrl-C 在退出前取消远程请求。
安全与隐私
- 令牌存储:
runcomfy login将 API 令牌写入~/.config/runcomfy/token.json,权限为 0600(仅所有者读写)。在 CI/容器中设置RUNCOMFY_TOKEN环境变量以绕过文件。 - 输入边界:用户提示通过
--input作为 JSON 字符串传递给 CLI。CLI 不会对提示进行 shell 扩展;它通过 HTTPS 将 JSON 主体直接传输到模型 API。提示内容不存在 shell 注入风险。 - 第三方内容:你传递的图像/遮罩/视频 URL 由 RunComfy 模型服务器获取,而非你机器上的 CLI。将外部 URL 视为不可信;基于图像的提示注入是任何图像编辑/视频编辑模型的已知风险。
- 出站端点:仅
model-api.runcomfy.net(请求提交)和*.runcomfy.net/*.runcomfy.com(生成输出的下载白名单)。无遥测,无回调。 - 生成文件大小上限:CLI 会中止任何超过 2 GiB 的单个下载,以防止恶意或失控模型输出导致磁盘填满。





