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 [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-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
字符串动作参考视频。时长限制取决于模式
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 on left side, background motion right"
  • 若结果出现偏移,简化提示:去掉修饰词,保留核心动作描述
  • 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错误/结构不匹配
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中的一个,并调用
runcomfy run <model_id>
传入匹配的JSON参数。CLI会向模型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主体传输给模型API。提示内容不存在shell注入风险
  • 第三方内容:你传入的图片/遮罩/视频URL由RunComfy模型服务器获取,而非本地CLI处理。请将外部URL视为不可信;基于图片的提示注入是所有图片/视频编辑模型的已知风险
  • 出站端点:仅允许访问
    model-api.runcomfy.net
    (请求提交)和
    *.runcomfy.net
    /
    *.runcomfy.com
    (生成结果下载白名单)。无遥测,无回调
  • 生成文件大小限制:CLI会中止任何超过2 GiB的单个下载,防止恶意或异常模型输出占满磁盘