scenario-mai-image

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario MAI Image

Scenario MAI Image

Overview

概述

MAI Image 2.5, Microsoft's image family on Scenario, splits into generation members (2.5, 2.5 Pro) and instruction editors (2.5 Edit, 2.5 Pro Edit). The family trait is typography: in-image headlines, labels, and taglines come back legible and placed where the prompt put them: the pick for posters, packaging, covers, and key art that carry real copy. Discover members with
search
and treat
model_schema_get
as the contract: the four agree on almost every field and disagree on the one that carries the source image.
Connection and the core loop: see the
scenario
skill in this repo; model-agnostic image work (sizing families, masks, upscales): the
scenario-image
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.
MAI Image 2.5是微软在Scenario平台上推出的图像模型系列,分为生成类模型(2.5、2.5 Pro)和指令编辑类模型(2.5 Edit、2.5 Pro Edit)。该系列的核心特点是文字排版能力:图内的标题、标签和标语不仅清晰可读,还能精准匹配提示词指定的位置,是制作承载真实文案的海报、包装、封面和主视觉设计的首选。你可以使用
search
指令查找模型成员,并将
model_schema_get
的返回结果作为使用规范:这四款模型几乎所有字段都一致,唯一的区别在于源图像的传入字段。
连接方式与核心工作流:请参考本仓库中的
scenario
skill;与模型无关的图像处理(尺寸系列、蒙版、超分辨率)请使用
scenario-image
skill。如果此处提到的关联skill不在你的可用skill列表中,请让用户安装(安装命令:
npx skills add scenario-labs/skills --skill <name>
);若处于无人值守模式,可基于工具schema继续执行并标记缺失项。

Quick reference

快速参考

At authoring time (names from the live schema):
MemberMakesSource inputRatios
2.5txt2imgnone11, incl. 21:9
2.5 Protxt2imgnone8
2.5 Editimg2img
referenceImages
, array of one
8
2.5 Pro Editimg2img
image
, single file
8
All four share
prompt
(4096 characters on 2.5 and Edit, 5000 on the Pro pair),
aspectRatio
(an enum defaulting to
auto
), and
numOutputs
(1 to 4, each added image adds cost). No width, height, seed, negative prompt, or mask field exists:
aspectRatio
is the only sizing control, and edits target elements by naming them in prose. On the generators
auto
picks a ratio from the prompt; on the editors it matches the source, so leave it there unless re-framing is the point.
在撰写本文时(模型名称来自实时schema):
模型成员功能类型源输入支持比例
2.5txt2img无11种,含21:9
2.5 Protxt2img无8种
2.5 Editimg2img
referenceImages
,单元素数组
8种
2.5 Pro Editimg2img
image
,单文件
8种
四款模型均支持
prompt
(2.5和Edit版本上限为4096字符,Pro系列上限为5000字符)、
aspectRatio
(枚举类型,默认值为
auto
)和
numOutputs
(1到4,每增加一张输出图像会增加成本)参数。模型不支持宽度、高度、随机种子、负向提示词或蒙版字段:
aspectRatio
是唯一的尺寸控制方式,编辑操作通过在提示词中用文字描述目标元素来定位。对于生成类模型,
auto
模式会根据提示词自动选择比例;对于编辑类模型,
auto
模式会匹配源图像的比例,因此除非需要重新构图,否则编辑时保持默认即可。

Typography is the lever

文字排版是核心优势

Write prose sentences, not tag lists: the family reasons over subject, composition, materials, lighting, and mood in that rough order. Wrap exact in-image copy in quotes so it renders verbatim, and give each text block a role, a style, and a place ("the headline 'GAME DAY' in bold condensed type across the top third"). Unquoted or vague copy comes back paraphrased or mangled, and many small text blocks compete, so group them. At authoring time text rendering was tuned for English and outputs landed near 1K, so plan a downstream upscale for print or hero use. Steering is positive-only: explore with
numOutputs
2 to 4 and refine the sentence rather than hunting for a seed.
请用完整的自然语言句子撰写提示词,而非标签列表:该系列模型会大致按照主体、构图、材质、光线、氛围的顺序进行理解。将需要精确显示在图内的文案用引号包裹,这样模型会逐字渲染,同时请为每个文本块指定作用、风格和位置(例如:“顶部三分之一处放置加粗压缩字体的标题'GAME DAY'”)。未加引号或表述模糊的文案可能会被改写或显示错乱,且过多的小文本块会相互竞争显示资源,因此请尽量合并文本块。在撰写本文时,文字渲染主要针对英语优化,输出分辨率接近1K,因此如果用于印刷或首屏展示,建议后续进行超分辨率处理。该模型仅支持正向提示引导:建议将
numOutputs
设为2到4来探索不同效果,通过优化提示词句子来调整,而非寻找特定随机种子。

Editing: preserve first, one change

编辑规则:先保留不变,单次仅改一处

Both editors take one source image and a plain instruction, under different fields: Edit wants
referenceImages
with exactly one asset id in an array, Pro Edit wants
image
as a single file. Porting a parameter block between them breaks the run, so re-read the schema when switching. Structure the prompt as what must stay unchanged, then one change, naming the exact element and its exact new state, with replacement copy in quotes ("change the sign to 'OPEN 24/7', same font and color"). Chain passes for several changes; edits hold identity well across iterations. The two shared one public image-edit arena entry (top 3 at authoring time) while a Pro Edit asset cost about four times an Edit asset, so
dry_run
both and start with Edit.
两款编辑类模型都接收一张源图像和一条纯文本指令,但使用的参数字段不同:Edit版本需要
referenceImages
参数,值为包含单个资产ID的数组;Pro Edit版本需要
image
参数,值为单个文件。在两款模型之间直接迁移参数块会导致运行失败,因此切换模型时请重新查看schema。提示词的结构应为:先说明必须保持不变的内容,再提出一处修改,明确指出要修改的元素及其新状态,替换的文案需用引号包裹(例如:“将招牌改为'OPEN 24/7',保持字体和颜色不变”)。如果需要多处修改,请分多次链式调用;编辑操作在多次迭代中能很好地保持主体一致性。两款编辑模型共用同一个公开图像编辑赛道入口(撰写本文时排名前三),而Pro Edit的资产成本约为Edit版本的四倍,因此建议先对两款模型都执行
dry_run
,并优先使用Edit版本。

Worked example: a campaign poster, then a copy swap

实操示例:制作活动海报,然后替换文案

  1. search
    with
    target="models"
    ,
    query="mai image"
    ,
    public=true
    . Note the generation and edit hits, e.g.
    model_microsoft-mai-image-2-5-pro
    and
    model_microsoft-mai-image-2-5-edit
    (live hits at authoring time: re-discover each session).
  2. model_schema_get
    on the generation pick: ratio list, prompt cap, defaults.
  3. model_run
    with
    dry_run=true
    and
    parameters={"prompt": "A photorealistic poster of a climber on a granite wall at dawn, warm rim light, the headline 'ASCEND' in tall condensed sans-serif across the top, a small tagline 'Hold your line' lower left, editorial sports aesthetic.", "aspectRatio": "2:3", "numOutputs": 4}
    .
    numOutputs
    moves cost, so re-estimate after changing it.
  4. Repeat with
    wait=false
    , then
    jobs_wait
    with the returned job id, re-called with
    pending_job_ids
    on timeout, never a second
    model_run
    .
  5. asset_display
    the four outputs and keep one asset id.
  6. model_schema_get
    on the edit pick, then
    model_run
    with
    parameters={"referenceImages": ["asset_x"], "prompt": "Keep the climber, lighting, and layout unchanged. Change only the headline to 'ASCEND HIGHER', same font, color, and placement."}
    ;
    jobs_wait
    , then
    asset_display
    .
  1. 调用
    search
    接口,设置
    target="models"
    、
    query="mai image"
    、
    public=true
    。记录生成类和编辑类的匹配结果,例如
    model_microsoft-mai-image-2-5-pro
    和
    model_microsoft-mai-image-2-5-edit
    (撰写本文时的实时匹配结果:每次会话都需要重新查找)。
  2. 对选中的生成类模型调用
    model_schema_get
    ,获取比例列表、提示词长度上限、默认值等信息。
  3. 调用
    model_run
    ,设置
    dry_run=true
    ,
    parameters={"prompt": "A photorealistic poster of a climber on a granite wall at dawn, warm rim light, the headline 'ASCEND' in tall condensed sans-serif across the top, a small tagline 'Hold your line' lower left, editorial sports aesthetic.", "aspectRatio": "2:3", "numOutputs": 4}
    。
    numOutputs
    会影响成本,因此修改后需要重新估算成本。
  4. 再次调用时设置
    wait=false
    ,然后使用返回的任务ID调用
    jobs_wait
    ,如果超时则使用
    pending_job_ids
    重新调用,切勿重复调用
    model_run
    。
  5. 调用
    asset_display
    展示四张输出图像,保留其中一个资产ID。
  6. 对选中的编辑类模型调用
    model_schema_get
    ,然后调用
    model_run
    ,设置
    parameters={"referenceImages": ["asset_x"], "prompt": "Keep the climber, lighting, and layout unchanged. Change only the headline to 'ASCEND HIGHER', same font, color, and placement."}
    ;调用
    jobs_wait
    后,再调用
    asset_display
    展示结果。

Common mistakes

常见错误

  • Carrying one editor's source field to the other:
    referenceImages
    (array of exactly one) and
    image
    (single file) are member-specific shapes.
  • Leaving in-image copy unquoted: only quoted text renders verbatim.
  • Stacking several edits in one instruction: one change per pass, then chain.
  • Sending pixel sizes or a ratio the member lacks:
    aspectRatio
    is an enum and the lists differ (21:9, 5:4, and 4:5 lived on one member at authoring time).
  • Re-running for a pixel-identical result: no seed exists; keep the winning asset and edit it forward.
  • Shipping the 1K output to print: upscale downstream (see the
    scenario-image
    skill).
  • 将一款编辑模型的源字段用到另一款上:
    referenceImages
    (仅含一个元素的数组)和
    image
    (单文件)是不同模型特有的参数格式。
  • 未给图内文案加引号:只有加引号的文本才会逐字渲染。
  • 在一条指令中堆叠多个编辑请求:每次仅修改一处,然后链式调用。
  • 传入模型不支持的像素尺寸或比例:
    aspectRatio
    是枚举类型,不同模型支持的比例列表不同(撰写本文时,21:9、5:4和4:5仅在某一款模型上支持)。
  • 重复运行以获取完全相同的像素级结果:模型没有随机种子参数;请保留效果最好的资产,再基于它进行后续编辑。
  • 直接将1K分辨率的输出用于印刷:请在后续流程中进行超分辨率处理(参考
    scenario-image
    skill)。