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 -g

Pick the right model for the user's intent

根据用户意图选择合适的模型

User intentModelWhy
Restyle a talking-head video — preserve face / pose / lip movementWan 2.7 Edit-VideoStrong identity + motion preservation; supports up to 1080p
Swap product background, keep camera motionWan 2.7 Edit-VideoCamera motion preserved; one-direction edit honored
Replace packaging design using a reference imageWan 2.7 Edit-Video +
reference_image
Reference-conditioned design transfer
Apply cinematic color grade / commercial polishWan 2.7 Edit-VideoGood at single-direction global look changes
Transfer precise motion from a reference video to a target characterKling 2.6 Pro Motion ControlDesigned for motion mapping with identity hold
Lip-sync motion of a target character to source video's lip movementKling 2.6 Pro Motion ControlBuilt for tight temporal coherence
Lightweight outfit / costume swap with identity preservationLucy Edit RestyleCore strength is localized identity-stable edits
Identity-stable restyle ("astronaut in desert", "warm golden-hour lighting")Lucy Edit RestyleSpecializes in temporal consistency for restyle
Default if unspecifiedWan 2.7 Edit-VideoMost 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 +
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功能最全面,分辨率最高
Agent会读取此表格,对用户意图进行分类,并选择匹配的下方路由。

Prerequisites

前置条件

  1. RunComfy CLI
    npm i -g @runcomfy/cli
  2. RunComfy account
    runcomfy login
    .
  3. CI / containers — set
    RUNCOMFY_TOKEN=<token>
    .
  4. A source video URL — formats and limits depend on the chosen route.

  1. RunComfy CLI
    npm i -g @runcomfy/cli
  2. RunComfy 账户
    runcomfy login
  3. CI/容器环境 — 设置环境变量
    RUNCOMFY_TOKEN=<token>
  4. 源视频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-video

Schema

字段说明

FieldTypeRequiredDefaultNotes
prompt
stringyesLead with preservation. One edit direction per call.
video
stringyesMP4/MOV URL, 2–10s, ≤100MB.
reference_image
stringnoURL — use for direct design / appearance transfer only.
resolution
enumno(input)
720p
or
1080p
.
aspect_ratio
enumno(input)W:H. Defaults to input.
duration
intno0
0
= match input;
2–10
= truncate from start.
audio_setting
enumno
auto
auto
or
origin
(preserve source audio).
seed
intnoReproducibility.
字段类型必填默认值说明
prompt
字符串优先说明保留内容。每次调用仅支持一种编辑方向。
video
字符串MP4/MOV格式URL,时长2–10秒,大小≤100MB。
reference_image
字符串URL — 仅用于直接设计/外观迁移场景。
resolution
枚举值(输入分辨率)
720p
1080p
aspect_ratio
枚举值(输入比例)宽:高。默认与输入一致。
duration
整数0
0
= 匹配输入时长;
2–10
= 从开头截断至指定时长。
audio_setting
枚举值
auto
auto
origin
(保留源音频)。
seed
整数用于结果复现。

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.
  • reference_image
    only when justified
    (packaging swap, costume swap with target visual). Don't pass refs for general restyle.
  • audio_setting: "origin"
    for talking-head where you don't want soundtrack regenerated.
  • Source video constraints: 2–10s, ≤100MB.

  • 优先说明保留目标
    "Preserve [面部/姿态/动作/构图/唇部动作]; [然后说明修改内容]"
  • 每次调用仅一种编辑方向。复合编辑会导致动作偏移。
  • 仅在必要时使用
    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-pro
Use 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

字段说明

FieldTypeRequiredNotes
prompt
stringyesDescribe target motion / style.
image
stringyes (image orientation)Reference for character / background consistency.
video
stringyesMotion reference. 10–30s depending on orientation.
keep_original_sound
boolnoPreserve audio from reference video.
character_orientation
enumyes
image
(max 10s output) or
video
(max 30s output).
字段类型必填说明
prompt
字符串描述目标动作/风格。
image
字符串是(图片模式)用于保持角色/背景一致性的参考图。
video
字符串动作参考视频。时长限制取决于模式,10–30秒。
keep_original_sound
布尔值保留参考视频的音频。
character_orientation
枚举值
image
(输出最长10秒)或
video
(输出最长30秒)。

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.
  • character_orientation: "image"
    caps output at 10s;
    "video"
    allows 30s.

  • 图片参考中的主体需占画面>5%,才能实现清晰的身份保留。
  • 空间约束有助于提升效果
    "角色在左侧,背景向右侧运动"
  • 若结果在多次迭代中偏移,简化提示词——去掉形容词,保留核心动作描述。
  • character_orientation: "image"
    输出最长10秒;
    "video"
    允许最长30秒输出。

Route 3: Lucy Edit Restyle — lightweight identity-stable restyle / outfit swap

路由3:Lucy Edit Restyle — 轻量级身份稳定风格重塑/服装替换

Model:
decart/lucy-edit/restyle
Use 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

字段说明

FieldTypeRequiredDefaultNotes
prompt
stringyesNatural-language edit instruction.
video_url
stringyesMP4/MOV/WEBM/GIF.
resolution
enumno
720p
720p
only on this tier.
字段类型必填默认值说明
prompt
字符串自然语言编辑指令。
video_url
字符串MP4/MOV/WEBM/GIF格式。
resolution
枚举值
720p
此版本仅支持
720p

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
    "preserve face and motion"
    is enough; don't over-specify.
  • 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 (
    wan-2-7
    ) for fuller treatment.
  • 每条路由继承对应模型的限制。Wan 2.7 Edit:时长2–10秒,最高1080p。Kling:图片模式最长10秒,视频模式最长30秒。Lucy:最高720p,无宽高比控制。
  • 不支持多路由混合。每次调用该Skill仅选择一个模型。
  • 品牌特定覆盖——如果用户指定了特定模型,路由到对应的品牌Skill(如
    wan-2-7
    )以获得更全面的处理。

Exit codes

退出码

codemeaning
0success
64bad CLI args
65bad input JSON / schema mismatch
69upstream 5xx
75retryable: timeout / 429
77not signed in or token rejected
代码含义
0成功
64CLI参数错误
65输入JSON错误/ schema不匹配
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
runcomfy run <model_id>
with the matching JSON body. The CLI POSTs to the Model API, polls the request, fetches the result, and downloads any
.runcomfy.net
/
.runcomfy.com
URL into
--output-dir
.
Ctrl-C
cancels the remote request before exit.
该Skill会根据用户意图选择Wan 2.7 Edit-Video / Kling 2.6 Pro Motion Control / Lucy Edit Restyle中的一个,并使用匹配的JSON请求体调用
runcomfy run <model_id>
命令。CLI会向Model API发送POST请求,轮询请求状态,获取结果,并将任何
.runcomfy.net
/
.runcomfy.com
地址的内容下载到
--output-dir
目录。按
Ctrl-C
会在退出前取消远程请求。

Security & Privacy

安全与隐私

  • Token storage:
    runcomfy login
    writes the API token to
    ~/.config/runcomfy/token.json
    with mode 0600 (owner-only read/write). Set
    RUNCOMFY_TOKEN
    env var to bypass the file entirely in CI / containers.
  • Input boundary: the user prompt is passed as a JSON string to the CLI via
    --input
    . 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.
  • 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
    model-api.runcomfy.net
    (request submission) and
    *.runcomfy.net
    /
    *.runcomfy.com
    (download whitelist for generated outputs). No telemetry, no callbacks.
  • Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.
  • 令牌存储
    runcomfy login
    会将API令牌写入
    ~/.config/runcomfy/token.json
    ,权限为0600(仅所有者可读写)。在CI/容器环境中,可设置环境变量
    RUNCOMFY_TOKEN
    来绕过文件存储。
  • 输入边界:用户提示词会作为JSON字符串通过
    --input
    参数传递给CLI。CLI不会对提示词进行shell展开;会直接通过HTTPS将JSON请求体传输给Model API。提示词内容不存在shell注入风险。
  • 第三方内容:你传入的图片/遮罩/视频URL会由RunComfy模型服务器获取,而非本地CLI。请将外部URL视为不可信内容;基于图片的提示注入是所有图片/视频编辑模型的已知风险。
  • 出站端点:仅允许访问
    model-api.runcomfy.net
    (请求提交)和
    *.runcomfy.net
    /
    *.runcomfy.com
    (生成结果下载白名单)。无遥测数据,无回调。
  • 生成文件大小限制:CLI会中止任何超过2 GiB的单个下载,防止恶意或失控的模型输出占满磁盘。