video-edit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese🎬 Video Edit — Pro Pack on RunComfy
🎬 RunComfy 视频编辑专业包
Video edit, intent-routed. This skill doesn't lock you to one model — it picks the right video-edit model in the RunComfy catalog based on what the user actually wants: general restyle, motion transfer from a reference clip, or lightweight identity-stable outfit / background swap.
bash
npx skills add agentspace-so/runcomfy-skills --skill video-edit -g视频编辑,意图路由匹配。该Skill不会限制你使用单一模型——它会根据用户实际需求,从RunComfy目录中选择合适的视频编辑模型:通用风格重塑、参考片段动作迁移,或是轻量级身份稳定的服装/背景替换。
bash
npx skills add agentspace-so/runcomfy-skills --skill video-edit -gPick the right model for the user's intent
根据用户意图选择合适模型
| User intent | Model | Why |
|---|---|---|
| Restyle a talking-head video — preserve face / pose / lip movement | Wan 2.7 Edit-Video | Strong identity + motion preservation; supports up to 1080p |
| Swap product background, keep camera motion | Wan 2.7 Edit-Video | Camera motion preserved; one-direction edit honored |
| Replace packaging design using a reference image | Wan 2.7 Edit-Video + | Reference-conditioned design transfer |
| Apply cinematic color grade / commercial polish | Wan 2.7 Edit-Video | Good at single-direction global look changes |
| Transfer precise motion from a reference video to a target character | Kling 2.6 Pro Motion Control | Designed for motion mapping with identity hold |
| Lip-sync motion of a target character to source video's lip movement | Kling 2.6 Pro Motion Control | Built for tight temporal coherence |
| Lightweight outfit / costume swap with identity preservation | Lucy Edit Restyle | Core strength is localized identity-stable edits |
| Identity-stable restyle ("astronaut in desert", "warm golden-hour lighting") | Lucy Edit Restyle | Specializes in temporal consistency for restyle |
| Default if unspecified | Wan 2.7 Edit-Video | Most versatile, highest resolution |
The agent reads this table, classifies the user's intent, and picks the matching subsection below.
| 用户意图 | 模型 | 选择理由 |
|---|---|---|
| 重塑对话头视频——保留面部/姿态/唇部动作 | Wan 2.7 Edit-Video | 身份与动作保留能力强;支持最高1080p分辨率 |
| 替换产品背景,保留镜头运动 | Wan 2.7 Edit-Video | 可保留镜头运动;支持单向编辑需求 |
| 使用参考图替换包装设计 | Wan 2.7 Edit-Video + | 支持基于参考图的设计迁移 |
| 应用电影级调色/商业级质感优化 | 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 | 功能最全面,分辨率最高 |
Agent会读取此表格,分类用户意图,并选择匹配的下方路由。
Prerequisites
前置条件
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account — .
runcomfy login - CI / containers — set .
RUNCOMFY_TOKEN=<token> - A source video URL — formats and limits depend on the chosen route.
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy 账号 —
runcomfy login - CI/容器环境 — 设置环境变量
RUNCOMFY_TOKEN=<token> - 源视频URL — 格式与限制取决于所选路由
Route 1: Wan 2.7 Edit-Video — default for restyle / background / packaging
路由1:Wan 2.7 Edit-Video — 风格重塑/背景/包装替换默认选择
Model:
wan-ai/wan-2-7/edit-video模型:
wan-ai/wan-2-7/edit-videoSchema
字段结构
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Lead with preservation. One edit direction per call. |
| string | yes | — | MP4/MOV URL, 2–10s, ≤100MB. |
| string | no | — | URL — use for direct design / appearance transfer only. |
| enum | no | (input) | |
| enum | no | (input) | W:H. Defaults to input. |
| int | no | 0 | |
| enum | no | | |
| int | no | — | Reproducibility. |
| 字段 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 字符串 | 是 | — | 优先说明保留内容。每次调用仅支持一种编辑方向。 |
| 字符串 | 是 | — | MP4/MOV格式URL,时长2–10秒,大小≤100MB |
| 字符串 | 否 | — | URL — 仅用于直接设计/外观迁移场景 |
| 枚举值 | 否 | (输入分辨率) | |
| 枚举值 | 否 | (输入比例) | 宽高比,默认与输入一致 |
| 整数 | 否 | 0 | |
| 枚举值 | 否 | | |
| 整数 | 否 | — | 用于结果复现 |
Invoke
调用示例
Background swap, identity preserved, audio kept:
bash
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>Packaging swap with reference image:
bash
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>背景替换,保留人物身份与音频:
bash
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>使用参考图替换包装:
bash
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>Prompting tips
提示技巧
- Preservation goals first: .
"Preserve [face / pose / motion / framing / lip movement]; [then state the change]" - One edit direction per call. Compound edits drift on motion.
- only when justified (packaging swap, costume swap with target visual). Don't pass refs for general restyle.
reference_image - for talking-head where you don't want soundtrack regenerated.
audio_setting: "origin" - Source video constraints: 2–10s, ≤100MB.
- 优先说明保留目标:
"Preserve [face / pose / motion / framing / lip movement]; [then state the change]" - 每次调用仅一种编辑方向。复合编辑会导致动作偏移
- 仅在必要时使用(包装替换、带目标视觉的服装替换)。通用风格重塑场景无需传入参考图
reference_image - 对话头场景使用,避免重新生成音轨
audio_setting: "origin" - 源视频限制:时长2–10秒,大小≤100MB
Route 2: Kling 2.6 Pro Motion Control — when motion FROM a reference clip is the point
路由2:Kling 2.6 Pro Motion Control — 需从参考片段迁移动作时使用
Model:
kling/kling-2-6/motion-control-proUse when the user wants to transfer the motion of a reference video onto a target character (driven by an image OR another video). This isn't restyle — it's motion mapping with identity hold.
模型:
kling/kling-2-6/motion-control-pro适用于用户希望将参考视频的动作迁移到目标角色(由图片或另一视频驱动)的场景。这不是风格重塑,而是带身份保留的动作映射。
Schema
字段结构
| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | Describe target motion / style. |
| string | yes (image orientation) | Reference for character / background consistency. |
| string | yes | Motion reference. 10–30s depending on orientation. |
| bool | no | Preserve audio from reference video. |
| enum | yes | |
| 字段 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| 字符串 | 是 | 描述目标动作/风格 |
| 字符串 | 是(图片模式) | 用于角色/背景一致性的参考图 |
| 字符串 | 是 | 动作参考视频。时长限制取决于模式 |
| 布尔值 | 否 | 保留参考视频的音频 |
| 枚举值 | 是 | |
Invoke
调用示例
bash
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>bash
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>Prompting tips
提示技巧
- Subject must be > 5% of frame in the image reference for clean identity hold.
- Spatial constraints help: .
"character on left side, background motion right" - Simplify if results drift between iterations — drop adjectives, keep core motion description.
- caps output at 10s;
character_orientation: "image"allows 30s."video"
- 参考图中主体需占画面>5%,才能保证清晰的身份保留效果
- 添加空间约束有助于提升效果:
"character on left side, background motion right" - 若结果出现偏移,简化提示:去掉修饰词,保留核心动作描述
- 输出最长10秒;
character_orientation: "image"输出最长30秒"video"
Route 3: Lucy Edit Restyle — lightweight identity-stable restyle / outfit swap
路由3:Lucy Edit Restyle — 轻量级身份稳定风格重塑/服装替换
Model:
decart/lucy-edit/restyleUse when the edit is localized style modification — outfit swap, scene relight, atmospheric restyle — and identity preservation is critical. Lighter-weight than Wan 2.7 Edit; capped at 720p.
模型:
decart/lucy-edit/restyle适用于本地化风格修改场景——服装替换、场景补光、氛围风格重塑——且身份保留至关重要。比Wan 2.7 Edit更轻量化,最高支持720p分辨率。
Schema
字段结构
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Natural-language edit instruction. |
| string | yes | — | MP4/MOV/WEBM/GIF. |
| enum | no | | |
| 字段 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| 字符串 | 是 | — | 自然语言编辑指令 |
| 字符串 | 是 | — | MP4/MOV/WEBM/GIF格式 |
| 枚举值 | 否 | | 此模型仅支持 |
Invoke
调用示例
Outfit swap:
bash
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>Atmospheric restyle:
bash
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>服装替换:
bash
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>氛围风格重塑:
bash
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>Prompting tips
提示技巧
- Localized change phrasing wins. "Outfit", "lighting", "background" — pick one bucket.
- Preserve identity goals — is enough; don't over-specify.
"preserve face and motion" - Avoid total replacement ("astronaut in space" works; "swap subject for a different person" doesn't). Lucy is built for localized style mods, not full character swap.
- No aspect ratio control — output matches input. Cropping happens server-side if you don't pre-match.
- 使用本地化修改表述效果更佳。明确“服装”“光线”“背景”等单一修改类别
- 明确身份保留目标——即可,无需过度指定
"preserve face and motion" - 避免完全替换主体(“太空里的宇航员”可行;“替换成另一个人”不可行)。Lucy专为本地化风格修改设计,不支持完整角色替换
- 不支持宽高比控制——输出与输入比例一致。若未预先匹配,服务器端会自动裁剪
Limitations
限制说明
- Each route inherits its model's limits. Wan 2.7 Edit: 2–10s, 1080p ceiling. Kling: 10s (image orientation) or 30s (video orientation). Lucy: 720p ceiling, no aspect control.
- No multi-route blending. This skill picks one model per call.
- Brand-specific overrides — if the user named a specific model, route to the corresponding brand skill () for fuller treatment.
wan-2-7
- 各路由继承对应模型的限制。Wan 2.7 Edit:时长2–10秒,最高1080p。Kling:图片模式最长10秒,视频模式最长30秒。Lucy:最高720p,无宽高比控制
- 不支持多路由混合。每次调用该Skill仅选择一个模型
- 品牌特定覆盖——若用户指定了特定模型,路由到对应品牌Skill(如)以获得更完整的功能
wan-2-7
Exit codes
退出码
| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77 | not signed in or token rejected |
Full reference: docs.runcomfy.com/cli/troubleshooting.
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 64 | CLI参数错误 |
| 65 | 输入JSON错误/结构不匹配 |
| 69 | 上游服务5xx错误 |
| 75 | 可重试:超时/429限流 |
| 77 | 未登录或令牌被拒绝 |
How it works
工作原理
The skill picks one of Wan 2.7 Edit-Video / Kling 2.6 Pro Motion Control / Lucy Edit Restyle based on user intent and invokes with the matching JSON body. The CLI POSTs to the Model API, polls the request, fetches the result, and downloads any / URL into . cancels the remote request before exit.
runcomfy run <model_id>.runcomfy.net.runcomfy.com--output-dirCtrl-C该Skill会根据用户意图选择Wan 2.7 Edit-Video/Kling 2.6 Pro Motion Control/Lucy Edit Restyle中的一个,并调用传入匹配的JSON参数。CLI会向模型API发送POST请求,轮询请求状态,获取结果,并将/链接的内容下载到。按下会在退出前取消远程请求。
runcomfy run <model_id>.runcomfy.net.runcomfy.com--output-dirCtrl-CSecurity & Privacy
安全与隐私
- Token storage: writes the API token to
runcomfy loginwith mode 0600 (owner-only read/write). Set~/.config/runcomfy/token.jsonenv var to bypass the file entirely in CI / containers.RUNCOMFY_TOKEN - Input boundary: the user prompt is passed as a JSON string to the CLI via . The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content.
--input - Third-party content: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
- Outbound endpoints: only (request submission) and
model-api.runcomfy.net/*.runcomfy.net(download whitelist for generated outputs). No telemetry, no callbacks.*.runcomfy.com - Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.
- 令牌存储:会将API令牌写入
runcomfy login,权限为0600(仅所有者可读写)。在CI/容器环境中,可设置~/.config/runcomfy/token.json环境变量以跳过文件存储RUNCOMFY_TOKEN - 输入边界:用户提示会作为JSON字符串通过传递给CLI。CLI不会对提示进行shell扩展,而是直接通过HTTPS将JSON主体传输给模型API。提示内容不存在shell注入风险
--input - 第三方内容:你传入的图片/遮罩/视频URL由RunComfy模型服务器获取,而非本地CLI处理。请将外部URL视为不可信;基于图片的提示注入是所有图片/视频编辑模型的已知风险
- 出站端点:仅允许访问(请求提交)和
model-api.runcomfy.net/*.runcomfy.net(生成结果下载白名单)。无遥测,无回调*.runcomfy.com - 生成文件大小限制:CLI会中止任何超过2 GiB的单个下载,防止恶意或异常模型输出占满磁盘