scenario-wan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario Wan Video

Scenario Wan 视频

Overview

概述

Wan, Alibaba's video family on Scenario, ships each job as its own member, and members a generation apart disagree on parameter names, not just numbers: pick the member with
search
, then treat
model_schema_get
as the contract before every run. Wan 2.7 Image is an image model, covered by the
scenario-image
skill.
Connection and the core loop: see the
scenario
skill in this repo; model-agnostic video work: the
scenario-video
skill. If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add scenario-labs/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
Wan是阿里巴巴在Scenario上的视频模型系列,每个任务对应一个独立的模型成员,不同代的成员之间不仅参数数值不同,参数名称也存在差异:使用
search
选择对应模型成员,每次运行前请以
model_schema_get
返回的schema为准。Wan 2.7 Image是图像模型,由
scenario-image
技能覆盖。
连接方式与核心流程:参见本仓库中的
scenario
技能;模型无关的通用视频处理功能:参见
scenario-video
技能。如果你的可用技能中缺少这里提到的同系列技能,请让用户安装(命令:
npx skills add scenario-labs/skills --skill <name>
);若处于无人值守状态,请根据工具schema继续操作并标注缺失项。

Quick reference

快速参考

Members by job (at authoring time):
JobMemberRequired inputs
Text to video2.7, 2.6, 2.5 T2V
prompt
Animate a still2.7, 2.6, 2.5 I2V
image
+ motion
prompt
Extend a clip2.7 I2V
video
+
prompt
(excludes
image
)
Restyle footage2.7 Video Edit
video
+ edit
prompt
Character performs a video's motion2.2 Animate (Move)
imageUrl
+
videoUrl
Swap the person in footage2.2 Animate (Replace)
videoUrl
+
imageUrl
Change aspect ratio2.2 Reframe
videoUrl
Expand the canvas2.2 Outpainting
videoUrl
+
prompt
Parameters do not port across generations. At authoring time: the 2.7 generators take
resolution
(720p or 1080p) and whole-second
duration
from 2 to 15, with
aspectRatio
(16:9 through 3:4) on T2V only. 2.6 and 2.5 T2V instead take one
size
string such as
"1920*1080"
, with
duration
from a fixed grid (5, 10, or 15 on 2.6; 5 or 10 on 2.5), while their I2V members take
resolution
. Video Edit takes a 2 to 10 second source; its
duration
is optional and truncates. Reframe and Outpainting have no
duration
: length is
numFrames
(81 to 241) at
framesPerSecond
(5 to 30), and output matches the source only when
matchInputNumFrames
and
matchInputFramesPerSecond
are true (both default false). Outpainting guides new content with up to 10
refImageUrls
.
On 2.7 I2V,
image
and
video
are mutually exclusive, and
endImage
(last frame) is only valid alongside
image
. Resolution and duration carry cost (1080p ran about triple 720p on 2.7 T2V at authoring time), so
dry_run
before batches.
按任务划分的模型成员(本文撰写时):
任务模型成员必填输入
文生视频2.7, 2.6, 2.5 T2V
prompt
静态图动效生成2.7, 2.6, 2.5 I2V
image
+ 动作
prompt
延长视频片段2.7 I2V
video
+
prompt
(不含
image
)
视频素材重风格化2.7 Video Edit
video
+ 编辑
prompt
角色复刻视频动作2.2 Animate (Move)
imageUrl
+
videoUrl
视频素材人物替换2.2 Animate (Replace)
videoUrl
+
imageUrl
调整宽高比2.2 Reframe
videoUrl
扩展画布2.2 Outpainting
videoUrl
+
prompt
参数无法跨代通用。本文撰写时的参数情况:2.7生成器接受
resolution
(720p或1080p)和2到15秒的整秒
duration
,其中
aspectRatio
(16:9到3:4)仅适用于T2V。2.6和2.5的T2V则接受单个
size
字符串,例如
"1920*1080"
,
duration
为固定档位(2.6为5、10或15秒;2.5为5或10秒),而它们的I2V成员使用
resolution
参数。Video Edit需要2到10秒的源视频;其
duration
为可选参数,用于截断视频。Reframe和Outpainting没有
duration
参数:视频长度由
numFrames
(81到241)和
framesPerSecond
(5到30)决定,只有当
matchInputNumFrames
和
matchInputFramesPerSecond
均为true时,输出才会与源视频匹配(两者默认均为false)。Outpainting最多可使用10个
refImageUrls
引导新内容生成。
在2.7 I2V中,
image
和
video
是互斥的,
endImage
(最后一帧)仅在传入
image
时有效。分辨率和时长会影响成本(本文撰写时,2.7 T2V的1080p生成成本约为720p的三倍),因此批量生成前请先执行
dry_run
。

Prompt the member's job

各模型任务的Prompt编写说明

T2V wants a full scene in natural language: subject action, one camera move, lighting, style tags. I2V wants motion only: the still already fixes look and composition, so re-describing it wastes the prompt. Video Edit wants instructions, one clear change per sentence with a precise target, plus preservation language ("keep subject identity and camera path");
referenceImage
carries a target look. In-frame readable text is unreliable on every member; push artifacts into
negativePrompt
(Video Edit and Animate lack it).
2.6 alone does multi-shot: with
multiShots
true (the default, but active only while
enablePromptExpansion
is true), open with a global style line, then
Shot 1 [0-3s] ...
,
Shot 2 [3-7s] ...
, keeping characters and location continuous.
enablePromptExpansion
defaults true on the generators (helps thin prompts, adds latency) and false on Reframe and Outpainting.
T2V需要用自然语言描述完整场景:主体动作、单个镜头运动、光线、风格标签。I2V只需要描述动作:静态图已经固定了画面外观和构图,重复描述会浪费prompt额度。Video Edit需要指令式描述,每句话对应一个明确的修改,目标要精准,还要加上保留说明(例如“保持主体身份和镜头路径”);
referenceImage
用于指定目标风格。所有模型成员都无法可靠生成画面内可读文字;请将瑕疵描述写入
negativePrompt
(Video Edit和Animate不支持该参数)。
只有2.6版本支持多镜头:当
multiShots
为true时(默认值为true,但仅在
enablePromptExpansion
为true时生效),先写一行全局风格说明,然后按
Shot 1 [0-3s] ...
、
Shot 2 [3-7s] ...
的格式编写,保持角色和场景的连续性。生成类模型的
enablePromptExpansion
默认为true(可丰富简略的prompt,但会增加延迟),Reframe和Outpainting的该参数默认为false。

Where the audio comes from

音频来源说明

The 2.7 generators always deliver audio: upload an
audio
file to drive it, or omit it and a synced track is generated from whatever sound the prompt describes, so prompt the ambience you want. On 2.6 and 2.5, audio comes only from an uploaded file (3 to 30 seconds, 15 MB or less at authoring time), which 2.6 lip-syncs. Video Edit's
audioSetting
decides the track:
origin
keeps the source audio,
auto
lets the model regenerate it. Animate carries the source track while
mergeAudio
stays true (the default).
2.7生成器始终会输出音频:你可以上传
audio
文件来驱动音频生成,若不上传,模型会根据prompt中描述的声音生成同步音轨,因此请在prompt中描述你想要的环境音。在2.6和2.5版本中,音频仅来自上传的文件(本文撰写时要求3到30秒,大小不超过15MB),2.6版本支持lip-sync。Video Edit的
audioSetting
参数决定音轨来源:
origin
保留源音频,
auto
让模型重新生成音频。当
mergeAudio
为true(默认值)时,Animate会保留源音轨。

Worked example: bracket a shot between two stills

实操示例:在两张静态图之间生成视频片段

  1. search
    with
    target="models"
    ,
    query="wan image to video"
    ,
    public=true
    . Prefer the newest non-deprecated hit, e.g.
    model_wan-2-7-i2v
    (a live hit at authoring time: re-discover each session).
  2. model_schema_get
    with that id: exclusivity notes, caps, defaults.
  3. upload_asset
    the opening and closing stills (see the
    scenario
    skill) for asset ids.
  4. model_run
    with that
    model_id
    ,
    dry_run=true
    , and
    parameters={"prompt": "She turns from the window and walks toward the door, coat swaying; slow push-in. Room tone and distant traffic, no music.", "image": "asset_open", "endImage": "asset_close", "duration": 5, "resolution": "1080p"}
    for the cost estimate; re-estimate after changing duration or resolution.
  5. Re-run with
    wait=false
    , then
    jobs_wait
    with the returned job id, re-called with
    pending_job_ids
    on timeout, never a second
    model_run
    .
  6. asset_display
    the output and review motion and audio together.
  1. 调用
    search
    ,参数为
    target="models"
    、
    query="wan image to video"
    、
    public=true
    。优先选择最新的未弃用结果,例如
    model_wan-2-7-i2v
    (本文撰写时的有效结果:每次会话都需要重新查询)。
  2. 用该模型ID调用
    model_schema_get
    :查看互斥说明、参数上限、默认值。
  3. 调用
    upload_asset
    上传首尾静态图(参见
    scenario
    技能),获取素材ID。
  4. 调用
    model_run
    ,传入
    model_id
    、
    dry_run=true
    和参数
    parameters={"prompt": "她从窗边转身,走向门口,外套随风摆动;镜头缓慢推进。房间环境音和远处的车流声,无音乐。", "image": "asset_open", "endImage": "asset_close", "duration": 5, "resolution": "1080p"}
    ,用于估算成本;修改时长或分辨率后需要重新估算。
  5. 将
    wait=false
    重新调用
    model_run
    ,然后用返回的任务ID调用
    jobs_wait
    ,如果超时则用
    pending_job_ids
    重新调用,切勿重复调用
    model_run
    。
  6. 用
    asset_display
    展示输出结果,同时检查动作和音频效果。

Common mistakes

常见错误

  • Combining
    image
    with
    video
    on 2.7 I2V, or passing
    endImage
    without
    image
    : the schema forbids both.
  • Porting a 2.7 payload to 2.6 or 2.5 T2V: they take
    size
    (
    "1280*720"
    style), not
    resolution
    plus
    aspectRatio
    , and off-grid durations fail.
  • Expecting Reframe or Outpainting to preserve length: defaults render 81 frames at 16 fps; set the two match flags.
  • Outpainting's expand flags default to all four sides: set the unwanted directions (
    expandTop
    ,
    expandBottom
    ,
    expandLeft
    ,
    expandRight
    ) to false.
  • Writing shot brackets with
    enablePromptExpansion
    false:
    multiShots
    is inert without it; no other member reads brackets.
  • Re-describing the still or requesting content changes in an I2V prompt: I2V animates; Video Edit changes content.
  • 在2.7 I2V中同时传入
    image
    和
    video
    ,或者传入
    endImage
    但没有
    image
    :schema均不允许这两种情况。
  • 将2.7的参数payload直接用于2.6或2.5 T2V:这两个版本使用
    size
    (
    "1280*720"
    格式),而非
    resolution
    加
    aspectRatio
    ,且非固定档位的时长会报错。
  • 期望Reframe或Outpainting保留原视频时长:默认设置下会以16fps渲染81帧;请设置两个匹配参数。
  • Outpainting的扩展参数默认向四个方向扩展:请将不需要的方向(
    expandTop
    、
    expandBottom
    、
    expandLeft
    、
    expandRight
    )设为false。
  • 在
    enablePromptExpansion
    为false的情况下编写镜头时间括号:没有该参数时
    multiShots
    不会生效;其他模型成员都不识别时间括号。
  • 在I2V的prompt中重复描述静态图或要求修改内容:I2V仅负责生成动效;如需修改内容请使用Video Edit。