video-edit

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>`。触发词包括“视频编辑”、“编辑视频”、“重风格视频”、“交换视频背景”、“动作控制”、“视频服装交换”或任何明确的视频转换请求。

20Star
9Fork
更新于 2026/6/14
SKILL.md
readonly只读
name
video-edit
description

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 最通用,最高分辨率

代理读取此表,分类用户意图,并选择下面匹配的子部分。

先决条件

  1. RunComfy CLInpm i -g @runcomfy/cli
  2. RunComfy 账户runcomfy login
  3. CI / 容器 — 设置 RUNCOMFY_TOKEN=<token>
  4. 源视频 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 (输入) 720p1080p
aspect_ratio enum (输入) 宽:高。默认为输入。
duration int 0 0 = 匹配输入;2–10 = 从开头截断。
audio_setting enum auto autoorigin(保留源音频)。
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 将请求 POST 到模型 API,轮询请求,获取结果,并将任何 .runcomfy.net/.runcomfy.com URL 下载到 --output-dirCtrl-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 的单个下载,以防止恶意或失控模型输出导致磁盘填满。