MiniMax-H3-Image提示词写法.md

MiniMax H3-Image 提示词写法(检索整理)

整理时间:2026-11-21 | 来源:官方 API 文档、官方 HF 模型卡、官方 PE 权重仓里的 task/system prompt、ComfyUI 官方模板内嵌 prompt、社区实测文与本站本机实测

一句话:H3-Image 不是"标签堆叠"模型,它吃的是"一整段密集的英文画面描述"(T2I),和"素材编号 + 保留清单 + 只写变化"(编辑)。 官方自己就是这么干的——线上 API 用 H3-Image-Context-IR 把中文短句改写成这种长描述;本地对应的是 MiniMax-H3-Image-PE(Qwen3.8-27B 微调)。所以"提示词写法"的核心,就是照着 PE 的产出格式写。


0. 先分清三种输入,写法完全不同

模式输入提示词形态关键约束
文生图 T2I只有 prompt一整段密集英文描述(无小标题、无分点)≤32000 字符;关掉改写时只有前 4096 token 生效,会被截断而不是降级
图像编辑 Editprompt + 1–16 张参考图三段式:素材定义 → 目标总述 + 保留关系 → 只写变化用 <Picture 1>…<Picture 16> 编号;无蒙版编辑;无 negative prompt
参考合成 / 多图一致性3–16 张图上面三段式的"一图一职"版本每张图只给一个主要任务,并写清"不许带进来什么"

本地 ComfyUI 侧还有两个开关影响写法:


1. T2I:一段式密集描述的写法

1.1 官方口径(模型卡 + PE task prompt 原文要点)

1.2 写的时候按这 8 项铺(顺序就是官方的信息密度顺序)

  1. 图像类型定性:The image is an overhead top-down photograph of … / …a finished product-design board…
  2. 主体与身份:年龄感、体型、发型、服装材质、标志性配饰(只用"看得见的"词)
  3. 构图与位置:主体在画面哪个方位、占据多少、留白在哪、有没有出画
  4. 一个主要动作 / 状态:手在做什么、眼神朝哪、接触点在哪(手指/支撑点对齐关系要写)
  5. 环境与背景:材质、纹理、天气、远处层次,别写"氛围感"这种空词
  6. 光线:光位(左上/逆光/窗光)、软硬、阴影方向、反射
  7. 镜头 / 媒介:机位高度、景别、焦段感、胶片颗粒、印刷质感
  8. 图上的文字 / 数据:要出现的字成对引号原样写;图表要有轴标签、刻度、图例、数值、单位

官方给的反例式提醒:"portrait / cinematic / video / UE5 / Weta / photorealistic / wide-angle" 这些词不决定画幅方向,也不提供可见信息;密度要来自"能看见的具体东西"。

1.3 信息类成品(海报/UI/图表/产品板/角色卡)额外要做的"内容地图"

官方 PE 会先静默列"槽位":title / subtitle / hero visual / left panel / right sidebar / card row / icon group / diagram body / process path / chart area / formula box / exploded view / inset / spec area / swatch strip / footer。 每个槽位至少写满 3 项:位置、可见文字/标签、具体视觉主体、功能或关系、材质/数据表现、层级/风格处理。 禁止用 icons、details、information、supporting graphics、annotations 这类空槽位词——必须说它画的是什么。

各自的最低配置(官方口径):

1.4 官方真实产出长什么样(可直接当范文背)

examples/revised_prompt.t2i.txt("俯拍农家餐桌"经 Context-IR 改写后的成品,1500 字符):

The image is an overhead, top-down photograph of a rustic farm-to-table feast spread across a weathered, dark brown wooden table with visible grain, knots, and a worn finish. In the center, a large woven basket holds a freshly baked rustic loaf of bread with a cracked golden-brown crust and scattered flour, alongside a halved loaf. To the left, a large dark ceramic plate presents an assortment of colorful seasonal vegetables, including bright orange carrots, deep red heirloom tomatoes, purple cabbage, and a mound of vibrant green leafy kale and arugula. On the right side, a wooden board displays artisanal cheeses: … The lighting is natural and warm, coming from the upper left and casting soft, long shadows to the lower right, enhancing the texture of the bread, …

结构一目了然:定性 → 中心主体 → 左 → 右 → 下 → 右上 → 左下一圈扫完 → 光线收尾。方位词(center / to the left / on the right / below / at the upper right / in the lower left)是它的骨架。

1.5 本机实测的一条可复用范文(1440×2560,6 步 11 秒)

见 dl-hub/10-视频生成流水线/20261120_2219_H3Image情绪写意人像/生成参数与提示词.txt,那套写法(POV 全身 + 9 头身 + 服装材质 + 背景 + 逆光/伦勃朗光 + 胶片颗粒 + 大留白 + 半出画构图 + 色调)就是"8 项铺满"的典型:信息密度够、没有空词、光位和构图都点名。


2. 图像编辑 / 多参考图:三段式(官方唯一推荐写法)

官方 PE 的 edit task prompt 把输出强制成三个逻辑段落、一段到底(不许换行、不许小标题)。你手写时照这个结构抄即可。

2.1 第一段:素材定义(<Subject N>)

2.2 第二段:目标总述 + 每个 Subject 的保留关系

总述固定以 The target image … 起句,先讲"变了什么/新增了什么",再用 Subject 令牌定位。然后每个 Subject 单独一句关系,四选一:

关系什么时候用写法要求
fully preserved身份、外观、数量、姿态、位置、拓扑、角色全不变只写 <Subject N> is fully preserved.,不许附加清单
partially preserved还能认出,但至少一个属性变了写"哪些类别保留 + 哪些变了(before→after)",不要复述保留部分的外观
attribute transfer把某个具体属性搬到另一个载体点名:源 Subject + 被搬属性 + 目标载体;不许多带别的属性
weak reference只借氛围/配色/构图原则点名借了什么,说明新设计可以怎么变

铁律:parent 里有被改的子元素,parent 就不能说 fully preserved;Full preserved 的 Subject 在第三段再也不能被外观复述(只能当光秃秃的定位锚点,如 beside <Subject 2>)。

2.3 第三段:只写"变化 + 新增 + 整合后果"

2.4 官方 edit 真实产出(examples/revised_prompt.edit.txt,播客双人照去耳机 + 碰拳)

The man on the left in a dark sweater and wristwatch in <Picture 1> is <Subject 1>. … The wooden desk sign with raised lettering reading 'MONEY TALKS' in <Picture 1> is <Subject 4>. … The target image shows <Subject 1> without the over-ear headphones from <Picture 1> and with fuller hair, as <Subject 1> and <Subject 2> lean inward to fist-bump directly above <Subject 4> between <Subject 3>. <Subject 1> is partially preserved; his identity, facial features, expression, dark sweater, and wristwatch remain, while his headphones are removed, his crown hair is filled in, and his posture changes from resting his forearms on the desk to leaning toward <Subject 2> … <Subject 3> is fully preserved. … On <Subject 1>, the headband indentation across the top of his head is gone, replaced by natural, voluminous wavy brown curls …

注意它怎么处理"没变的东西":一句 fully preserved 就结束,一个形容词都不多给。

2.5 人话版模板(编辑 / 换装 / 换物)

为 <Picture 1> 中的[角色/商品]制作一张[成品类型],用于[用途]。
用 <Picture 1> 确定[主体身份 / 底图构图]。
保留 <Picture 1> 的[逐项:脸型、发缝方向、机身比例、按键数量与位置、标题位置、留白]。
只用 <Picture 2> 取[一种特征,如铁锈红立领剪裁 / 篮编网罩纹理],用在[指定部位];不要带 <Picture 2> 的[模特/背景/其他物件]。
用 <Picture 3> 确定[一个影响场景的特征:温室结构 / 右上暖光 / 胡桃木台面]。
修改[本次唯一要改的内容]:从[原状]变为[目标状]。
成图约束:[取景、机位高度、主体在画面位置、必须准确出现的文字(原样引号)]。

少一张图就删掉对应那一行;换顺序必须重核编号(<Picture N> 按上传顺序,API 里也写作 image N)。

2.6 "一图一职"分工表(社区实测 + 官方 16 图案例)

你要做的事第一张放什么什么时候才加图
改现成图里一处要改的原图(当底图)新物件/新材质有明确样子,需按图还原
同商品换场景能看清轮廓的实拍要借另一张的材质、灯光或构图
同角色换装换景脸/发型清晰的角色参考另一张补服装、姿势或看不到的角度
多物件进一个场景有现成布局就先放布局图新图提供一个独立物件或缺失视角

排查优先级:先看最明显的一处(不是重写全篇)。

症状先改哪里
角色长得像服装图里的模特把服装图裁到只剩衣服,或换平铺图
商品变成参考图里的配色写明只允许改哪个表面 + 机身颜色以哪张为准
画面多出风格参考图的物件把风格图裁到只剩光线/色块/纹理
局部替换后标题或边缘也动了固定底图宽高比、取景、标题位置,再与原图并排核对
结果像用了另一张图先核对实际上传顺序与提示词编号
连续几轮越来越不像原图回到原始底图,每轮只改一个地方

3. 参数与工程侧(决定"写了有没有用")


4. 可直接复制的两套成品骨架

4.1 T2I 骨架(英文,占位符替换)

The image is a [medium/format: overhead photograph / vertical poster / product-design board]
of [main subject with identity cues], in [composition: centered / off-center left / half out of frame],
with [one primary action or state, incl. hand/contact detail].
[Left/right/upper/lower areas: what occupies them, materials, textures, colors.]
[Environment and background depth], lit by [light source position, hardness, shadow direction, reflections].
[Camera: height, framing, lens feel, film/print texture, grain].
[On-image text: exact wording in quotes, position, typography, color — or state no text.]
[Optional: overall color grade and craft finish.]

4.2 Edit 骨架(英文,三段式一段到底)

The [element] in <Picture 1> is <Subject 1>. The [element with literal text 'X'] in <Picture 1> is <Subject 2>. The [element] in <Picture 2> is <Subject 3>.
The target image shows <Subject 1> [the one change] while <Subject 2> [relation]. 
<Subject 1> is partially preserved; [retained categories] remain, while [changed category] changes from [before] to [after]. <Subject 2> is fully preserved. <Subject 3> supplies [one property] transferred to [carrier].
[Only the changed/new content: final appearance, integration consequences — contact, occlusion, shadow, perspective, scale.]

5. 八个常见坑

  1. 拿视频那套六段式硬套(subject_definitions/summary/retention_analysis…):那是 H3 视频 Ref2VA 的格式;H3-Image 的编辑用的是一段到底的三段落,写小标题反而污染。
  2. 只写剧情不写画面:"一个女孩在雨里很孤独" → 模型只会自由发挥。要写位置、动作、光位、材质、镜头。
  3. 堆形容词:"cinematic, masterpiece, ultra detailed, 8k" 对 H3-Image 几乎无用,反而挤占 4096 token 预算。
  4. 用 4 MP 出图然后骂画质:先上 12–16 MP,再降采样到目标尺寸。
  5. 编辑只写"保持构图不变":必须写保留清单(逐项列),否则被无视。
  6. 期待改一处、四周像素一动不动:官方没有蒙版编辑;需要像素级不变就后期合成。
  7. 指望 PE 帮你"只改一个字":编辑侧的 PE(本地)官方明说仍在开发中,只有 prompt;线上 API 的编辑改写会重写整段,可能顺手加戏(社区实测:留白区被自动补了日期和场地)。要留白就用"plain blue area that must stay blank"这种否定式显式描述,或关掉改写。
  8. 多图不点名分工:"把这几张结合起来" = 让模型猜。每张图一个主任务 + 一句"不许带进来什么"。

6. 来源


附:本机随附文件

下载此文件