scenario-consistency

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario Consistency

Scenario 一致性

Overview

概述

"Make variant two look exactly like variant one except for X" is the most repeated creative ask, and agents reach for seeds, which do not solve it. Consistency comes from what you feed the model, in rising order of durability: a prompt baseline, reference images, a style reference, a control map, a trained model. The same references carry a character into video. Connection and the core loop: see the
scenario
skill; training: see
scenario-model-training
; creating and filing a named character or prop library, with its sheets: see
scenario-identity-library
. 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.
“让变体二除了X之外完全和变体一一致”是最常见的创意需求,而Agent常会使用seed,但这并不能解决问题。一致性取决于你给模型输入的内容,按持久度从低到高依次为:prompt基线、参考图、风格参考、control map、训练好的模型。同样的参考可以将角色带入视频生成。相关关联与核心循环:参见
scenario
技能;训练相关:参见
scenario-model-training
;创建并归档带设定稿的命名角色或道具库:参见
scenario-identity-library
。如果你可用的技能中缺少此处提到的兄弟技能,请让用户安装(
npx skills add scenario-labs/skills --skill <name>
);无人值守时,基于工具schema继续操作并标记缺失项。

Quick reference

快速参考

TechniqueHoldsEffortReach for it when
Baseline-plus-delta promptidentity, framing, palettelowalways, it is the floor
Reference image inputidentity and worldlowa set of scenes or angles
Style reference inputrendering style, not a subjectlowicon sets, UI, an illustration series
asset_detect
control map
pose, geometry, compositionmediumthe layout must not move
Reference-to-videoidentity through motionmediumthe character or product has to move
Seed reuseone image's exact rolllowre-rolling a single generation
Trained modela house style, or a cast at scalehighreferences stop scaling (see below)
Scenario's published pipeline guidance: generate one strong reference image, pass it as an image input to every scene generation, and prefer models with the most reference-image slots.
技术方法保持效果工作量适用场景
基线+增量prompt身份、构图、调色板低始终使用,这是基础操作
参考图输入身份与场景环境低多场景或多角度生成
风格参考输入渲染风格,而非主体低图标集、UI、插画系列
asset_detect
control map
姿势、几何结构、构图中布局不能变动时
参考转视频动态过程中的身份一致性中角色或产品需要动起来时
Seed复用单张图像的完全复现低重新生成单张图时
训练后的模型品牌风格,或大规模角色群高参考图不再适用时(见下文)
Scenario官方发布的流程指南:生成一张高质量参考图,将其作为图像输入传入每个场景的生成任务,优先选择参考图插槽最多的模型。

The baseline-plus-delta prompt

基线+增量prompt

Write out everything that must not change, then put the single change in a final clause. Keep the prompt byte-identical between runs and edit only that clause. A change every item must carry (new wardrobe, a haircut) is baseline, not delta: run it once as the hero's own delta, approve the result as the new hero, then anchor the set to it, so the reference and the enumeration describe the same look.
Enumerate specifics: subject geometry, camera height and angle, subject size and position in frame, lighting direction, each named sub-element and where it sits, palette by name or hex, and embedded text. Look at the baseline first (
asset_display
): you cannot enumerate a shade you have not seen, and vague anchors drift.
Attach the approved baseline as a reference image alongside it. Image models converge on
referenceImages
, but cap, requiredness, and cardinality come from
model_schema_get
, and on some the field is a single scalar file. A scalar
image
plus
strength
is img2img, not a reference slot: it anchors composition along with identity, and at the default strength a plain-background anchor overrides a whole-scene delta, so a scene set needs a true reference field. Wrap an array only where the schema says
array: true
, even a lone asset as
["asset_..."]
: a bare string is silently dropped and the run succeeds ignoring it. State each reference's role in the prompt. Approved on-model shots fill the remaining slots: curate them as a collection (catalog tools, write lane) and retrieve them with
search
filters={"collection_ids": [...]}
. Some style-reference members mint a reusable style on the first run: the id sits in the finished job's output metadata (
job_get
with
verbose=true
), not in the run response or on the asset, and later runs pass it in the schema's id field in place of the images. The two fields are exclusive and only the image field is flagged
cost_impact
, so the mint is paid once: read the field text before passing the same reference set on every run. The first run must still carry the images even where the schema marks both fields optional: the member refuses a run with neither.
The anchor can be an upload: the user's character art, sketch, or product photo goes up with
upload_asset
plus
upload_asset_complete
(see
scenario
) and rides the reference field like any approved hero.
asset_describe
(see
scenario-asset-analysis
) returns a style synthesis (medium, palette, lighting, composition, mood) that seeds the palette and lighting lines of the enumeration; the sub-element inventory comes from looking, or from
asset_analyze
with the enumeration headings as its instruction (both are catalog tools;
asset_describe
prices with
dry_run
).
A set takes one
model_run
per item: a batch-count field repeats one prompt and cannot carry a per-item delta clause.
写出所有不能改变的内容,然后将唯一的变动放在最后一个分句中。每次运行的prompt保持完全一致,仅修改该分句。如果是所有项都需要携带的变更(新服装、新发型),属于基线变更而非增量:将其作为主角自身的增量运行一次,获批后作为新的主角基线,再将整个系列锚定到它,这样参考图和枚举描述的是同一外观。
枚举具体细节:主体几何结构、相机高度与角度、主体在画面中的尺寸与位置、光照方向、每个命名子元素及其位置、按名称或十六进制值指定的调色板,以及嵌入文本。先查看基线(
asset_display
):你无法枚举没见过的色调,模糊的锚点会导致偏移。
将获批的基线作为参考图附加在旁。图像模型都支持
referenceImages
,但上限、必填性和基数需通过
model_schema_get
获取,有些模型中该字段是单个标量文件。标量
image
加
strength
是img2img,而非参考插槽:它会同时锚定构图和身份,在默认强度下,纯背景的锚点会覆盖整个场景的增量,因此场景系列需要真正的参考字段。仅当schema标注
array: true
时才包装为数组,即使是单个资源也要写成
["asset_..."]
:纯字符串会被静默丢弃,运行会忽略它并正常执行。在prompt中说明每个参考的作用。获批的符合设定的镜头可填充剩余插槽:将它们整理为集合(目录工具,写入通道),并通过
search
filters={"collection_ids": [...]}
检索。有些风格参考成员会在首次运行时生成可复用的风格:其id位于完成任务的输出元数据中(使用
verbose=true
调用
job_get
),而非运行响应或资源中,后续运行可在schema的id字段中传入该id来替代图片。这两个字段是互斥的,且只有图片字段标记了
cost_impact
,因此生成风格只需付费一次:每次运行传入相同参考集前请阅读字段说明。即使schema将两个字段都标记为可选,首次运行也必须携带图片:成员会拒绝两者都没有的运行请求。
锚点可以是上传的内容:用户的角色原画、草图或产品照片可通过
upload_asset
和
upload_asset_complete
上传(参见
scenario
),并像任何获批主角一样使用参考字段。
asset_describe
(参见
scenario-asset-analysis
)会返回风格综合结果(媒介、调色板、光照、构图、氛围),可作为枚举中调色板和光照部分的基础;子元素清单可以通过目视查看,或通过
asset_analyze
以枚举标题作为指令生成(两者都是目录工具;
asset_describe
通过
dry_run
计费)。
一个系列的每个项都需要一次
model_run
:批计数字段只会重复同一个prompt,无法携带逐项的增量分句。

Locking a style without a subject

无主体的风格锁定

A style reference is a different slot from a subject reference, and a few image models expose it: at authoring time one family took one to ten images as
styleReferenceImages
, built a private style from them for a small extra charge, and returned a reusable style id in the job output that later runs pass as
styleId
instead of the images (the two are mutually exclusive), with
styleMatch
choosing
precise
or
flexible
adherence. It holds rendering, palette, and line, not a character: pair it with a subject reference or the baseline enumeration for identity. Find such members with
recommend
and the style need in the user's own words, then confirm the field on
model_schema_get
. Palette fields taking RGB triples (
colors
) are preferences, not constraints: keep the hex values in the prompt too.
风格参考是与主体参考不同的插槽,只有少数图像模型提供该功能:在编写本文时,有一个模型系列支持1到10张图作为
styleReferenceImages
,会基于这些图生成私有风格,收取少量额外费用,并在任务输出中返回可复用的风格id,后续运行可传入
styleId
替代图片(两者互斥),并通过
styleMatch
选择
precise
(精确)或
flexible
(灵活)的匹配度。它保持渲染效果、调色板和线条,而非角色:需要与主体参考或基线枚举配合使用来保证身份一致性。可通过
recommend
用用户自己的话描述风格需求来找到这类成员,然后通过
model_schema_get
确认字段。接受RGB三元组的调色板字段(
colors
)是偏好项而非约束项:请同时在prompt中保留十六进制值。

Locking structure with a control map

用control map锁定结构

Generate the map and pass it as a conditioning input. Never extract it for the attribute that is the delta: a pose map from the approved image locks the pose you were asked to change; a pose set needs its map from a target-pose image, or none.
asset_detect
takes an
asset_id
and a
modality
from
canny
,
depth
,
grayscale
,
lineart_anime
,
mlsd
,
normal
,
pose
,
scribble
,
segmentation
,
sketch
(
remove_background
defaults true). Catalog-only and write lane, despite the docs page grouping it under Analysis: run it via
scenario_tool_execute_write
.
The control block (
controlImage
,
controlModality
,
controlStrength
,
controlStart
,
controlEnd
) exists only on models listing
controlnet
in
capabilities
: check before planning around it; models without it take reference images.
controlModality
allows
canny
,
tile
,
depth
,
blur
,
pose
,
gray
and
low-quality
: only canny, depth and pose map across,
grayscale
becoming
gray
.
controlStrength
defaults to 0.7 with a recommended 0.3 to 0.8 band: near 0.7 for canny, depth and tile, 0.8 to 0.9 for pose, gray and blur, rigid above 0.9. Strength is how much,
controlStart
and
controlEnd
are when:
controlEnd
near 0.65 locks composition early, then releases so the prompt refines detail.
生成map并将其作为条件输入传入。永远不要针对作为增量的属性提取map:从获批图像提取的pose map会锁定你本要修改的姿势;姿势系列需要从目标姿势图像提取map,或者不使用map。
asset_detect
接受
asset_id
和
modality
参数,
modality
可选值包括
canny
、
depth
、
grayscale
、
lineart_anime
、
mlsd
、
normal
、
pose
、
scribble
、
segmentation
、
sketch
(
remove_background
默认为true)。尽管文档页面将其归类在分析下,但它仅支持目录和写入通道:请通过
scenario_tool_execute_write
运行。
控制块(
controlImage
、
controlModality
、
controlStrength
、
controlStart
、
controlEnd
)仅存在于
capabilities
中列出
controlnet
的模型上:在规划前请先检查;没有该功能的模型使用参考图。
controlModality
支持
canny
、
tile
、
depth
、
blur
、
pose
、
gray
和
low-quality
:只有canny、depth和pose可对应转换,
grayscale
对应
gray
。
controlStrength
默认为0.7,推荐范围为0.3到0.8:canny、depth和tile接近0.7,pose、gray和blur为0.8到0.9,0.9以上为刚性锁定。强度表示控制程度,
controlStart
和
controlEnd
表示控制时机:
controlEnd
接近0.65时会提前锁定构图,然后释放控制权,让prompt优化细节。

Carrying identity into video

将身份一致性带入视频

Reference-to-video members animate the subject the references show, with no first frame locking composition. The catalog has no reference-to-video capability value: these members are tagged
img2video
, so
recommend
with
capability="img2video"
and the consistency need in the user's own words ("the same character as in these images"), then confirm on
model_schema_get
that the pick carries a multi-slot
referenceImages
array (7 to 9 slots on the leading members at authoring time, one of them billing slots past the first four) and, to copy a motion, a
referenceVideo
or
referenceVideos
slot (capped between 3 and 15 seconds, billed per second of upload on some). When nothing ranked carries the array,
search
a family name from the video model-family skills
scenario-video
lists. Slot count moves the price less than resolution and duration: read both enums off
model_schema_get
, where
cost_impact
marks them, and prove identity on the cheapest roll that still shows the whole action, the lowest resolution at the delivery duration (a shorter clip hides late drift), pricing that payload and the delivery payload with
dry_run
first (one proving roll priced 80 CU against 130 at the defaults). A passing proving roll validates the recipe, not the roll: the delivery render gets its own sweep before it ships.
image
, the first-frame anchor, and the reference arrays are mutually exclusive on several families: a reference run opens free, and pinning the opening frame is a different member. Fill the slots from the library: the hero and two or three approved on-model shots per
scenario-identity-library
, as individual shots, never the turnaround sheet. With no library yet, the approved hero alone in one slot is a valid first run (the published pipeline starts from one strong reference), and the next slots fill from approved stills out of the image reference loop above, once one reads as a clean character view (neutral pose, no scene props: a scene still carries its props and pose into the slot), never from cropping the sheet. Prompt the action, not the look: some schemas address uploads by order ("Image 1 turns toward the camera, moving as in Video 1"), others state that the subjects appear with or without a prompt, and on all of them re-describing the character fights the images. Per-family contracts and prompt syntax: the video model-family skills
scenario-video
lists. Judge identity across the whole clip:
asset_get
returns
firstFrame
and
lastFrame
as free asset ids, but a drift that fades in mid-shot passes both, so sweep the frames with
model_scenario-video-to-image-seq
(a fixed first-party id: Scenario's single deterministic frame extractor, so discovery would only re-derive it) before the clip ships: about two frames a second (
frameInterval
is an integer count of source frames between extractions, the clip's
frameRate
from
asset_get
halved and rounded, 12 at 24 fps; the clip goes in
video
), since a spot check of one frame per shot read clean at 10.5 seconds on a clip whose defect appeared at 11.0. Judge each frame against the baseline enumeration by sub-element: a named part gained, lost, recolored or reshaped is drift; a part that moves with the action, a cloak swinging or an antenna tilting, is animation and passes.
参考转视频成员会让参考图中的主体动起来,且不会通过首帧锁定构图。目录中没有“参考转视频”的能力值:这些成员标记为
img2video
,因此请使用
capability="img2video"
调用
recommend
,并用用户自己的话描述一致性需求(“和这些图片里的同一个角色”),然后通过
model_schema_get
确认所选模型带有多插槽
referenceImages
数组(编写本文时,主流成员有7到9个插槽,其中前四个之后的插槽会单独计费),如果需要复刻动作,还需要有
referenceVideo
或
referenceVideos
插槽(时长限制在3到15秒,有些模型按上传秒数计费)。如果排名靠前的结果都没有该数组,可从
scenario-video
列出的视频模型系列技能中搜索系列名称。插槽数量对价格的影响小于分辨率和时长:请从
model_schema_get
中读取这两个枚举值,它们会标记
cost_impact
,并在能展示完整动作的最便宜生成方案(即交付时长下的最低分辨率,更短的片段可以掩盖后期偏移)上验证身份一致性,先用
dry_run
计算验证负载和交付负载的费用(一次验证生成的费用为80 CU,而默认配置下为130 CU)。通过验证的生成只是确认了方案有效,而非最终结果:交付渲染在输出前还需要进行自身的帧扫描。
image
(首帧锚点)和参考数组在多个系列中是互斥的:参考生成是免费开启的,而锁定开场帧需要使用不同的成员。从库中填充插槽:按照
scenario-identity-library
的要求,使用主角和2到3张获批的符合设定的镜头,且必须是单张镜头,绝不能用转面稿。如果还没有库,仅将获批主角放在一个插槽中也是有效的首次运行(官方流程就是从一张高质量参考图开始的),后续插槽可从上述图像参考循环中获批的静帧填充,前提是静帧是清晰的角色视图(中性姿势,无场景道具:场景静帧会把道具和姿势一起带入插槽),绝不能从转面稿中裁剪。prompt描述动作,而非外观:有些schema按顺序引用上传内容(“图像1转向镜头,动作如视频1所示”),另一些则说明主体是否需要prompt配合,所有情况下重新描述角色都会和参考图产生冲突。各系列的约定和prompt语法:参见
scenario-video
列出的视频模型系列技能。要判断整个片段的身份一致性:
asset_get
会返回
firstFrame
和
lastFrame
作为免费资源id,但中段逐渐出现的偏移会逃过首尾帧检查,因此在片段交付前请使用
model_scenario-video-to-image-seq
(固定的官方id:Scenario唯一的确定性帧提取器,因此搜索只会重新得到它)扫描帧:大约每秒2帧(
frameInterval
是两次提取之间的源帧整数计数,将
asset_get
返回的片段
frameRate
减半并取整,24 fps下为12;片段放入
video
字段),因为有个片段的缺陷出现在11.0秒,而每镜头一帧的抽查在10.5秒时显示正常。对照基线枚举按子元素判断每一帧:命名的部分出现新增、缺失、变色或变形都属于偏移;随动作移动的部分,比如摆动的斗篷或倾斜的天线,属于动画效果,视为合格。

When references stop scaling

参考图不再适用的情况

Reference-first is the published order and the cheaper one, so exhaust it before training. Training pays back when one character recurs across hundreds of images, when four or more identities must share scenes, or when every run needs the same rendering style whatever the subject. Train one model per recurring character and a separate one for the style: a single model carrying both drifts on whichever it saw less of. Multi-character scenes composite rather than co-generate, because reference slots split attention: generate each identity alone against its baseline, then place them together with the edit workflows in
scenario-image-editing
. Dataset size, base choice, and the quote-before-launch rule:
scenario-model-training
. A trained model never runs by its own id (
runs_as
and
run_with
, see
scenario
), and it still takes the baseline-plus-delta prompt: training lightens the enumeration, not the delta discipline.
Sprite sheets and animation frames are the hard case: adjacent frames from a general image model drift in proportion, scale, and silhouette, which an engine exposes at once. Frames of one character come from the video lanes in
scenario-sprite-animation
, where one render holds the identity instead of a generation per frame.
参考优先是官方推荐的顺序,也是成本更低的方式,因此在训练前请先穷尽参考方案。当一个角色要出现在数百张图中、四个或更多身份需要共享场景,或者每次运行无论主体是什么都需要相同的渲染风格时,训练模型才划算。每个重复出现的角色训练一个模型,风格单独训练一个模型:同时承载两者的单个模型会在出现较少的那一方上出现偏移。多角色场景采用合成而非共同生成,因为参考插槽会分散注意力:每个身份单独基于其基线生成,然后通过
scenario-image-editing
中的编辑工作流将它们放在一起。数据集大小、基础模型选择和启动前报价规则:参见
scenario-model-training
。训练好的模型永远不会通过自身id运行(
runs_as
和
run_with
,参见
scenario
),且仍然需要使用基线+增量prompt:训练只是减少了枚举的工作量,而非不需要增量规范。
精灵图和动画帧是难点:通用图像模型生成的相邻帧会在比例、缩放和轮廓上出现偏移,引擎会立刻暴露这些问题。单个角色的帧来自
scenario-sprite-animation
中的视频通道,那里通过一次渲染保持身份一致性,而非逐帧生成。

Worked example: five poses of one mascot

示例:一个吉祥物的五个姿势

  1. asset_display
    the approved hero (
    asset_hero
    ) and write its baseline: the full must-not-change enumeration above.
  2. recommend
    with the task's own words as
    prompt
    (
    search
    only for a named family), preferring models with reference-image slots, then
    model_schema_get
    : the reference field's name, cap, cardinality, requiredness. No reference field in the schema disqualifies the candidate: go back to the ranked list, and when that holds nothing reference-capable either (
    recommend
    ranks community fine-tunes and can miss first-party models), take a family name from a sibling model-family skill (
    scenario-gemini-image
    ,
    scenario-seedream
    ) and
    search
    for it.
  3. One
    model_run
    per pose, five in all: the byte-identical baseline, the pose alone in the final clause, the hero in the reference field shaped as the schema says:
    ["asset_hero"]
    only under
    array: true
    . No seed. No control map: a pose map from the hero locks the pose being changed.
  4. jobs_wait
    on the five jobs, re-calling with
    pending_job_ids
    until done.
    asset_display
    each against the hero; fix drift by tightening the enumeration, not by chaining outputs.
  1. 用
    asset_display
    查看获批主角(
    asset_hero
    )并编写其基线:上述所有不能变更的枚举内容。
  2. 用任务的原始描述作为
    prompt
    调用
    recommend
    (
    search
    仅用于搜索指定系列),优先选择有参考图插槽的模型,然后调用
    model_schema_get
    确认:参考字段的名称、上限、基数、必填性。schema中没有参考字段的候选模型直接排除:回到排名列表,如果列表中也没有支持参考的模型(
    recommend
    会对社区微调模型排名,可能漏掉官方模型),从兄弟模型系列技能(
    scenario-gemini-image
    、
    scenario-seedream
    )中取一个系列名,然后用
    search
    搜索。
  3. 每个姿势一次
    model_run
    ,共五次:基线完全一致,仅在最后一个分句中写明姿势,主角按照schema要求的格式放入参考字段:仅当
    array: true
    时写成
    ["asset_hero"]
    。不要用seed。不要用control map:从主角提取的pose map会锁定要修改的姿势。
  4. 调用
    jobs_wait
    等待这五个任务,用
    pending_job_ids
    重新调用直到完成。将每个结果和主角对比用
    asset_display
    查看;通过收紧枚举来修正偏移,而非链式输出生成。

Common mistakes

常见错误

  • Reaching for a seed to make two prompts match: it reproduces one generation and transfers nothing. Leave it unset across a set; set one only to re-roll a single unchanged prompt.
  • Writing "same as before": there is no memory between calls; restate the baseline in full each time.
  • Chaining a set output to output: drift compounds. Anchor every item to the same approved baseline.
  • Training for a one-off: one character in one scene is a reference job, and a recurring cast at scale is the training case above, one model per character plus one for the style.
  • Assuming
    asset_detect
    modality names are valid
    controlModality
    values.
  • Passing the turnaround sheet into a reference slot, video or image: a video member animates the grid, and on an image model the sheet is a filing and review artifact, not a reference. Slots take individual approved shots.
  • Re-describing the character in a reference-to-video prompt: the images carry the look; the prompt carries action, camera, and timing.
  • 试图用seed让两个prompt的结果匹配:seed只能复现单次生成,无法传递任何一致性。在系列生成中不要设置seed;仅在重新生成单个未修改的prompt时才设置。
  • 写“和之前一样”:调用之间没有记忆;每次都要完整重述基线。
  • 系列生成中链式使用输出:偏移会累积。每个项都要锚定到同一个获批基线。
  • 为一次性需求训练模型:一个场景中的一个角色用参考方案即可,大规模重复出现的角色群才是上述训练方案的适用场景,每个角色一个模型,再加一个风格模型。
  • 误以为
    asset_detect
    的modality名称就是有效的
    controlModality
    值。
  • 将转面稿放入参考插槽(视频或图像):视频成员会把网格做成动画,而在图像模型上,转面稿是归档和审核用的产物,而非参考图。插槽应使用单独的获批镜头。
  • 在参考转视频的prompt中重新描述角色:外观由参考图决定;prompt只负责描述动作、相机和时机。