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
string先说明保留需求,每次调用仅指定一种编辑方向。
video
stringMP4/MOV格式URL,时长2–10秒,大小≤100MB。
reference_image
stringURL — 仅用于直接的设计/外观迁移场景。
resolution
enum(输入视频分辨率)
720p
1080p
aspect_ratio
enum(输入视频比例)宽:高,默认与输入视频一致。
duration
int0
0
= 匹配输入视频时长;
2–10
= 从开头截取对应时长。
audio_setting
enum
auto
auto
origin
(保留源视频音频)。
seed
int用于结果复现。

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
string描述目标动作/风格。
image
string是(图片模式)用于保持角色/背景一致性的参考图。
video
string动作参考视频。时长限制取决于模式,10–30秒不等。
keep_original_sound
bool保留参考视频的音频。
character_orientation
enum
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
string自然语言编辑指令。
video_url
stringMP4/MOV/WEBM/GIF格式。
resolution
enum
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中的一个模型,并使用匹配的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的单个下载,防止恶意或失控模型输出占满磁盘。