siyarajput commited on
Commit
f774f1b
·
verified ·
1 Parent(s): 9a2fc99

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +370 -0
README.md ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: text-to-image
3
+ license: other
4
+ license_name: minimax-h3-image-community-license-agreement
5
+ license_link: LICENSE
6
+ library_name: minimax-h3
7
+ language:
8
+ - en
9
+ tags:
10
+ - text-to-image
11
+ - image-to-image
12
+ - image-editing
13
+ - image-generation
14
+ - minimax-h3
15
+ - diffusers
16
+ base_model:
17
+ - MiniMaxAI/MiniMax-H3
18
+ ---
19
+
20
+ <div align="center">
21
+ <img width="100%" src="assets/minimax-h3-image.jpg" alt="MiniMax H3 image, Open Weights">
22
+ </div>
23
+
24
+ <p align="center">
25
+ <a href="https://hailuoai.video" target="_blank"><img src="https://img.shields.io/badge/Hailuo%20AI-FF6C37?logo=minimax&logoColor=white" alt="Hailuo AI"></a>
26
+ <a href="https://platform.minimax.io" target="_blank"><img src="https://img.shields.io/badge/API-FF6C37?logo=minimax&logoColor=white" alt="API"></a>
27
+ <a href="https://www.minimax.io" target="_blank"><img src="https://img.shields.io/badge/MiniMax%20Website-FF6C37?logo=minimax&logoColor=white" alt="MiniMax Website"></a>
28
+ <a href="https://github.com/MiniMax-AI/MiniMax-H3-Image" target="_blank"><img src="https://img.shields.io/badge/GitHub-181717?logo=github&logoColor=white" alt="GitHub"></a>
29
+ <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image" target="_blank"><img src="https://img.shields.io/badge/Hugging%20Face-FFD21E?logo=huggingface&logoColor=black" alt="Hugging Face"></a>
30
+ <br>
31
+ <a href="https://modelscope.cn/models/MiniMax/MiniMax-H3-Image" target="_blank" rel="noopener noreferrer"><img alt="ModelScope MiniMax AI" src="https://img.shields.io/badge/ModelScope-MiniMax%20AI-white?labelColor=%23EF3D5D"></a>
32
+ <a href="https://platform.minimax.cn/docs/faq/contact-us" target="_blank"><img src="https://img.shields.io/badge/WeChat-07C160?logo=wechat&logoColor=white" alt="WeChat"></a>
33
+ <a href="https://discord.com/invite/dbMxutw7tP" target="_blank"><img src="https://img.shields.io/badge/Discord-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
34
+ <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/LICENSE"><img src="https://img.shields.io/badge/LICENSE-4CAF50?logo=creativecommons&logoColor=white" alt="LICENSE"></a>
35
+ </p>
36
+
37
+ # MiniMax-H3-Image
38
+
39
+ ## Online API
40
+
41
+ Use MiniMax-H3-Image directly via API.
42
+
43
+ - Global: [platform.minimax.io](https://platform.minimax.io/docs/guides/image-generation) | CN: [platform.minimax.cn](https://platform.minimax.cn/docs/guides/image-generation)
44
+
45
+ API docs:
46
+ - Text-to-image: [EN-docs](https://platform.minimax.io/docs/api-reference/image-generation-h3-generations), [CN-docs](https://platform.minimax.cn/docs/api-reference/image-generation-h3-generations)
47
+ - Image editing: [EN-docs](https://platform.minimax.io/docs/api-reference/image-generation-h3-edits), [CN-docs](https://platform.minimax.cn/docs/api-reference/image-generation-h3-edits)
48
+ - Prompt expansion: [EN-docs](https://platform.minimax.io/docs/api-reference/image-generation-h3-context-ir), [CN-docs](https://platform.minimax.cn/docs/api-reference/image-generation-h3-context-ir)
49
+
50
+ ## Online App
51
+
52
+ Use MiniMax-H3-Image directly via App.
53
+
54
+ - WebApp Global: [hailuoai.video](https://hailuoai.video/) | CN: [hailuoai.com](https://hailuoai.com/)
55
+ - Desktop Global: [agent.minimax.io](https://agent.minimax.io/) | CN: [agent.minimax.cn](https://agent.minimax.cn)
56
+
57
+ ## Introduction
58
+
59
+ MiniMax-H3-Image is a state-of-the-art open-source model for image generation and editing from
60
+ the [MiniMax H3](https://huggingface.co/MiniMaxAI/MiniMax-H3) family. It combines intelligent
61
+ understanding of creative intent with the ability to build visual worlds: with precise
62
+ instruction following, it develops a creative concept into concrete characters, scenes and
63
+ atmosphere. Generation and editing are unified in one checkpoint, which generates images from
64
+ text (text-to-image) and edits one or more reference images (image editing), giving creators
65
+ and developers a flexible and controllable way to create images.
66
+
67
+ It generates images of about 16 megapixels at every aspect ratio, from 4096x4096 (1:1) to
68
+ 6272x2688 (21:9), directly and without an upscaler (see [Sizes](#sizes)). The checkpoint is
69
+ distilled to 6 sampling steps (6 NFEs) with no classifier-free guidance. Its diffusion
70
+ transformer (DiT) has the H3 architecture without the audio layers, and it uses the
71
+ MiniMax-H3 text encoder unchanged.
72
+
73
+ ![Fifteen MiniMax-H3-Image text-to-image results in landscape and portrait formats: a 3D fantasy battle, a blue-green landscape painting, a tree frog, an indigo-dyed rabbit, a 3D white-haired girl, a portrait among flowers, a sci-fi city, dumplings, a highland cow, a mirror portrait, a 3D otter and sheep, a pixel art cat, a jewel beetle, giant cherries and a fisheye selfie](assets/showcase_hero.jpg)
74
+
75
+ **Highlights**
76
+
77
+ MiniMax-H3-Image brings together three core strengths: speed, image quality, and instruction
78
+ following.
79
+
80
+ 1. **16-megapixel images at a practical computational cost.** Compared with the 1–4 MP outputs
81
+ common today, 16 MP (4096 × 4096) images offer far more detail but typically require
82
+ substantially more computation. MiniMax-H3-Image keeps that computational cost manageable,
83
+ making 16 MP generation practical for everyday creation.
84
+ 2. **Rich detail. Remarkable realism.** MiniMax-H3-Image goes beyond the familiar “AI look” to
85
+ produce images with intricate detail and lifelike realism, opening up more possibilities for
86
+ creative and professional use. It brings generated imagery closer to the richness and nuance
87
+ of the real visual world.
88
+ 3. **Stronger instruction following.** Greater creative control. Great image generation goes
89
+ beyond beautiful pictures—it helps creators bring their ideas to life. MiniMax-H3-Image
90
+ delivers the strongest instruction following among open-source models and supports up to 16
91
+ reference images, giving creators more control over the final result.
92
+
93
+ ## Model Zoo
94
+
95
+ | Model | Role | Precision | Size | Hugging Face |
96
+ | --- | --- | --- | --- | --- |
97
+ | **MiniMax-H3-Image** | Text-to-image and image editing | BF16 (DiT) | 68.65 GB | [MiniMaxAI/MiniMax-H3-Image](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image) |
98
+ | **MiniMax-H3-Image-PE** (optional) | Prompt expander for text-to-image | NVFP4 | 17.9 GB | [MiniMaxAI/MiniMax-H3-Image-PE](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE) |
99
+
100
+ ## Model Architecture
101
+
102
+ <!-- TODO(release): architecture figure, e.g. assets/architecture.png, adapted from MiniMax-H3's assets/full-arch.png without the audio branch. -->
103
+
104
+ MiniMax-H3-Image follows the H3-Base design with the audio branch removed. The text
105
+ prompt and the reference images are encoded by the H3 text encoder; the reference images are
106
+ also encoded by the image VAE. All tokens form one packed sequence for a single-stream
107
+ transformer, which predicts the latent of the target image. The VAE decodes that latent
108
+ into the image.
109
+
110
+ - **Text encoder**: the full Qwen3-VL text encoder of MiniMax-H3, unchanged. The DiT reads
111
+ the hidden states of its 50th layer.
112
+ - **Image VAE**: a CNN encoder and a 2D ViT decoder (24 layers), with 16x spatial
113
+ downsampling and 24 latent channels. The DiT patchifies the latent with a 2x2 patch, so each
114
+ transformer token covers 32x32 pixels.
115
+ - **Diffusion transformer**: 33.1B parameters, a dense single-stream transformer with 50
116
+ layers (hidden size 5376, 56 attention heads, FFN size 14336) and 3D multimodal RoPE, the same
117
+ as the H3-Omni-Transformer. The weights are BF16; the embedding, timestep and output layers
118
+ are FP32.
119
+
120
+ ## Quick Start
121
+
122
+ ### Download
123
+
124
+ | Component | Content | Size |
125
+ | --- | --- | --- |
126
+ | `transformer/` | DiT: BF16, with the embedding, timestep and output layers in FP32. | 66.28 GB |
127
+ | `pdd_fused_heads.safetensors`, `pdd_config.json` | The per-step output heads that replace the transformer's output layer, and the sampling schedule. | 12 MB |
128
+ | `vae/` | Image VAE, FP32. | 2.34 GB |
129
+ | `tokenizer/`, `processor/` | Qwen3-VL tokenizer and processor, identical to MiniMax-H3. | 23 MB |
130
+ | Text encoder | Not in this repository. `model_index.json` loads it from [`MiniMaxAI/MiniMax-H3`](https://huggingface.co/MiniMaxAI/MiniMax-H3), folder `text_encoder/`. If you already have MiniMax-H3, it is not downloaded again. | 66.7 GB |
131
+
132
+ ```text
133
+ MiniMax-H3-Image/
134
+ ├── model_index.json
135
+ ├── pdd_config.json
136
+ ├── pdd_fused_heads.safetensors
137
+ ├── processor/
138
+ ├── tokenizer/
139
+ ├── transformer/
140
+ └── vae/
141
+ ```
142
+
143
+ Download this repository and the MiniMax-H3 text encoder into the Hugging Face cache:
144
+
145
+ ```bash
146
+ hf download MiniMaxAI/MiniMax-H3-Image
147
+ hf download MiniMaxAI/MiniMax-H3 --include "text_encoder/*"
148
+ # optional prompt expander
149
+ hf download MiniMaxAI/MiniMax-H3-Image-PE
150
+ ```
151
+
152
+ ### Local Deployment
153
+
154
+ We recommend the following inference frameworks to serve the model:
155
+
156
+ - [SGLang](https://docs.sglang.io/) - see [cookbook](https://docs.sglang.io/cookbook/diffusion/MiniMax/MiniMax-H3-Image)
157
+ - [vLLM-Omni](https://github.com/vllm-project/vllm-omni) - see [vllm-omni recipe](https://recipes.vllm.ai/MiniMaxAI/MiniMax-H3-Image)
158
+ - [diffusers](https://github.com/huggingface/diffusers) - see [diffusers docs](https://huggingface.co/docs/diffusers/main/en/api/pipelines/minimax_h3_image)
159
+ - [LightX2V](https://github.com/ModelTC/LightX2V) - see [Usage guide](https://github.com/ModelTC/LightX2V/tree/main/scripts/minimax_h3_image)
160
+ - [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio) - see [DiffSynth docs](https://diffsynth-studio-doc.readthedocs.io/en/latest/Model_Details/MiniMax-H3-Image.html); try low-vram inference & training
161
+ - [ComfyUI](https://github.com/Comfy-Org/ComfyUI) - see [Comfy tutorial](https://docs.comfy.org/tutorials/image/minimax/minimax-h3-image); use [T2I template](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_minimax_h3_image_t2i.json) / [Edit template](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_minimax_h3_image_edit.json)
162
+
163
+ #### vLLM-Omni Deployment
164
+
165
+ See the [vLLM-Omni recipe](https://recipes.vllm.ai/MiniMaxAI/MiniMax-H3-Image) for
166
+ per-hardware deployment configurations and measured latency. Both NVIDIA and AMD accelerators are
167
+ supported, including NVIDIA H200, RTX PRO 6000 Blackwell, AMD Instinct MI350X and more.
168
+
169
+ Start the server on one GPU:
170
+
171
+ ```bash
172
+ vllm serve MiniMaxAI/MiniMax-H3-Image --omni --host 0.0.0.0 --port 8000
173
+ ```
174
+
175
+ For lower latency, split each request over several GPUs with sequence parallelism
176
+ (Ulysses), for example on 4 GPUs:
177
+
178
+ ```bash
179
+ vllm serve MiniMaxAI/MiniMax-H3-Image --omni --host 0.0.0.0 --port 8000 \
180
+ --num-gpus 4 --usp 4 --text-encoder-tp-size 4
181
+ ```
182
+
183
+ #### SGLang Deployment
184
+
185
+ Here we use SGLang as a deployment example. See the [MiniMax-H3-Image deployment guide](https://docs.sglang.io/cookbook/diffusion/MiniMax/MiniMax-H3-Image) for
186
+ additional deployment configurations.
187
+
188
+ Start the server on one GPU:
189
+
190
+ ```bash
191
+ sglang serve --model-path MiniMaxAI/MiniMax-H3-Image --host 0.0.0.0 --port 30000 --warmup-mode off
192
+ ```
193
+
194
+ To use a local copy of the MiniMax-H3 `text_encoder/` folder instead of the Hugging Face
195
+ cache, add `--text-encoder-path <path to text_encoder>`.
196
+
197
+ For lower latency, split each request over several GPUs with sequence parallelism
198
+ (Ulysses), for example on 4 GPUs:
199
+
200
+ ```bash
201
+ sglang serve --model-path MiniMaxAI/MiniMax-H3-Image --host 0.0.0.0 --port 30000 --warmup-mode off \
202
+ --num-gpus 4 --ulysses-degree 4
203
+ ```
204
+
205
+ #### Request parameters
206
+
207
+ Text-to-image requests are JSON sent to `/v1/images/generations`. Image editing requests send
208
+ the reference images as multipart form data to `/v1/images/edits`; their order defines
209
+ `<Picture 1>`, `<Picture 2>`, and so on in the prompt. Both return the PNG in
210
+ `data[0].b64_json`. Runnable examples are in [Full Workflow](#full-workflow).
211
+
212
+ | Field | Text-to-image | Image editing | Notes |
213
+ | --- | --- | --- | --- |
214
+ | `prompt` | Required | Required | Used as given, truncated to 4096 tokens. See [Full Workflow](#full-workflow) |
215
+ | `size` | Required | Required | `WIDTHxHEIGHT`. The returned image has exactly this size; see [Sizes](#sizes) |
216
+ | `image` | — | One or more files | In upload order they are `<Picture 1>`, `<Picture 2>`, ... in the prompt |
217
+ | `seed` | Recommended | Recommended | Integer |
218
+ | `generator_device` | `cpu` recommended | `cpu` recommended | Same seed, same initial noise on every machine |
219
+ | `response_format` | `b64_json` | `b64_json` | |
220
+ | `min_generation_area` | Optional | Optional | Minimum generated area in pixels, 1024-16777216, default 4194304 (2048x2048). A smaller `size` is generated at the same aspect ratio on a larger canvas and resized back with LANCZOS; pass 1024 to turn this off. All sizes in the table below are above the default |
221
+ | `num_inference_steps` | Omit or 6 | Omit or 6 | Other values return HTTP 400 |
222
+ | `guidance_scale` | Omit or 1 | Omit or 1 | Other values return HTTP 400 |
223
+ | `negative_prompt` | Not supported | Not supported | Rejected |
224
+
225
+ #### Sizes
226
+
227
+ The effective working range of MiniMax-H3-Image is about 4 MP to 20 MP, and it generally gives
228
+ the best results at around 16 MP. Common 16 MP sizes are listed below:
229
+
230
+ | Aspect ratio | Size (width x height) |
231
+ | --- | --- |
232
+ | 1:1 | 4096x4096 |
233
+ | 4:3 / 3:4 | 4736x3552 / 3552x4736 |
234
+ | 3:2 / 2:3 | 5024x3360 / 3360x5024 |
235
+ | 16:9 / 9:16 | 5472x3072 / 3072x5472 |
236
+ | 21:9 | 6272x2688 |
237
+
238
+ ### Full Workflow
239
+
240
+ MiniMax-H3-Image expects a detailed English description of the whole image. The MiniMax API
241
+ turns a short prompt in any language into such a description with **H3-Image-Context-IR** before
242
+ generation. We also provide
243
+ [MiniMax-H3-Image-PE](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE), which can be
244
+ deployed locally.
245
+
246
+ This section reproduces the quality of images generated directly by the MiniMax API with a
247
+ locally deployed SGLang server. The scripts are in
248
+ [`examples/`](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/tree/main/examples) and use only
249
+ the Python standard library; run them in that folder:
250
+
251
+ ```bash
252
+ hf download MiniMaxAI/MiniMax-H3-Image --include "examples/*" --local-dir .
253
+ cd examples
254
+ ```
255
+
256
+ Before running examples, set your MiniMax API endpoint and key to use the H3-Image-Context-IR API
257
+ and the reference scripts. The scripts read them from the environment:
258
+
259
+ ```bash
260
+ # MiniMax API endpoint (choose one)
261
+ # CN
262
+ export MINIMAX_API_BASE="https://api.minimax.cn"
263
+ # Global
264
+ # export MINIMAX_API_BASE="https://api.minimax.io"
265
+
266
+ # API key obtained from the MiniMax platform
267
+ export MINIMAX_API_KEY="<api-key>"
268
+ ```
269
+
270
+ API docs:
271
+ - H3-Image-Context-IR: use /v1/h3_image_context_ir [EN-docs](https://platform.minimax.io/docs/api-reference/image-generation-h3-context-ir), [CN-docs](https://platform.minimax.cn/docs/api-reference/image-generation-h3-context-ir)
272
+ - Text-to-image: use /v1/images/generations [EN-docs](https://platform.minimax.io/docs/api-reference/image-generation-h3-generations), [CN-docs](https://platform.minimax.cn/docs/api-reference/image-generation-h3-generations)
273
+ - Image editing: use /v1/images/edits [EN-docs](https://platform.minimax.io/docs/api-reference/image-generation-h3-edits), [CN-docs](https://platform.minimax.cn/docs/api-reference/image-generation-h3-edits)
274
+
275
+ #### case-T2I
276
+
277
+ [`instruction.t2i.txt`](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/instruction.t2i.txt).
278
+
279
+ <table>
280
+ <thead>
281
+ <tr><th colspan="2">Stage</th><th>Request</th><th>Result</th></tr>
282
+ </thead>
283
+ <tbody>
284
+ <tr><td rowspan="2">Prompt Enhancement</td><td>H3-Image-Context-IR (MiniMax API)</td><td><code>python3 context_ir.py t2i</code> (<a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/context_ir.py">script</a>)</td><td><code>revised_prompt.txt</code>, <code>revised_size.txt</code>; our run: <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/revised_prompt.t2i.txt"><code>revised_prompt.t2i.txt</code></a>, <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/revised_size.t2i.txt"><code>revised_size.t2i.txt</code></a> (4736x3552)</td></tr>
285
+ <tr><td>local alternative: <a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE">MiniMax-H3-Image-PE</a></td><td><code>scripts/expand_prompt.py</code> in the PE repository</td><td>Save <code>expanded_caption</code> as <code>revised_prompt.txt</code> and the size for <code>aspect_ratio</code> as <code>revised_size.txt</code></td></tr>
286
+ <tr><td colspan="2">MiniMax-H3-Image generation: local SGLang</td><td><code>python3 t2i.py --prompt revised_prompt.txt --size $(cat revised_size.txt)</code> (<a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/t2i.py">script</a>)</td><td><code>t2i.png</code></td></tr>
287
+ <tr><td colspan="2">E2E API Reference: text-to-image by directly calling the MiniMax API</td><td><code>python3 api_generate.py t2i</code> (<a href="https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/api_generate.py">script</a>)</td><td><code>api_t2i.png</code></td></tr>
288
+ </tbody>
289
+ </table>
290
+
291
+ <p align="center">
292
+ <img src="assets/workflow_t2i.jpg" alt="Left: t2i.png from local SGLang with the enhanced prompt. Right: api_t2i.png from the MiniMax API. Both show an overhead farm-to-table feast with bread, vegetables and cheeses on a weathered wooden table" width="100%"/>
293
+ </p>
294
+ <p align="center"><em>t2i.png from local SGLang (left) and api_t2i.png from the MiniMax API (right), 4736x3552 (4:3 picked by H3-Image-Context-IR)</em></p>
295
+
296
+ #### case-Edit
297
+
298
+ [`instruction.edit.txt`](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/instruction.edit.txt)
299
+ with the reference image [`reference1.png`](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/reference1.png)
300
+ as `<Picture 1>`.
301
+
302
+ | Stage | Request | Result |
303
+ | --- | --- | --- |
304
+ | Prompt Enhancement: H3-Image-Context-IR (MiniMax API) | `python3 context_ir.py edit` ([script](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/context_ir.py)) | `revised_prompt.txt`, `revised_size.txt`; our run: [`revised_prompt.edit.txt`](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/revised_prompt.edit.txt), [`revised_size.edit.txt`](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/revised_size.edit.txt) (4096x4096) |
305
+ | MiniMax-H3-Image generation: local SGLang | `python3 edit.py --prompt revised_prompt.txt --size $(cat revised_size.txt)` ([script](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/edit.py)) | `edit.png` |
306
+ | E2E API Reference: image editing by directly calling the MiniMax API | `python3 api_generate.py edit` ([script](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/examples/api_generate.py)) | `api_edit.png` |
307
+
308
+ <p align="center">
309
+ <img src="assets/workflow_edit.jpg" alt="Left: reference1.png, the reference image of two podcast hosts with the man wearing headphones. Middle: edit.png from local SGLang with the enhanced prompt. Right: api_edit.png from the MiniMax API. In both results the headphones are gone and the hosts bump fists above the MONEY TALKS sign" width="100%"/>
310
+ </p>
311
+ <p align="center"><em>Reference image reference1.png (left), edit.png from local SGLang (middle) and api_edit.png from the MiniMax API (right), 4096x4096 (1:1 picked by H3-Image-Context-IR)</em></p>
312
+
313
+ ## Showcase
314
+
315
+ Text-to-image and image editing results, shown downscaled.
316
+
317
+ <p align="center">
318
+ <img src="assets/showcase/photo.jpg" alt="Three photorealistic photographs: a woman hanging white sheets on a rooftop at dusk under a full moon, a close-up profile of a curly-haired young man holding a cup, and flamingos wading in shallow water" width="100%"/>
319
+ </p>
320
+ <p align="center"><em>Photorealistic photography</em></p>
321
+
322
+ <p align="center">
323
+ <img src="assets/showcase/surreal.jpg" alt="Three surreal editorial photographs: a barber trimming a cloud seated in a barber chair, a person slicing the moon on a lawn at night, and a model stepping out of a giant pear" width="100%"/>
324
+ </p>
325
+ <p align="center"><em>Surreal editorial photography</em></p>
326
+
327
+ <p align="center">
328
+ <img src="assets/showcase/scene.jpg" alt="Four environment concepts: ruins of an ancient open-air theater in a forest titled ENVIRONMENT CONCEPT: THE ANCIENT THEATER, a dragon rider on a red rock cliff, an abandoned railway station with an ARRIVALS sign, and shipwrecks frozen in an icy sea" width="100%"/>
329
+ </p>
330
+ <p align="center"><em>Environment concepts</em></p>
331
+
332
+ <p align="center">
333
+ <img src="assets/showcase/char.jpg" alt="Characters, creatures and props: a soldier in a worn helmet and armor, a red-finned dragon-like creature in a forest, a weathered astronaut helmet on Mars, and a three-view character sheet of a figure in winter clothing" width="100%"/>
334
+ </p>
335
+ <p align="center"><em>Characters, creatures and props</em></p>
336
+
337
+ <p align="center">
338
+ <img src="assets/showcase/art.jpg" alt="Four paintings and illustrations: mandarin ducks in a lotus pond in an oil painting style, a Jiangnan garden in light watercolor, tarot card XVIII THE MOON with a rabbit, and a Chinese gongbi painting of a pelican looking into a mirror with four calligraphy characters" width="100%"/>
339
+ </p>
340
+ <p align="center"><em>Painting and illustration styles</em></p>
341
+
342
+ <p align="center">
343
+ <img src="assets/showcase/text.jpg" alt="Two logic puzzle boards: a Chinese candidate-selection puzzle with five conditions and the derived answer, and an English board titled CONFIDENTIAL FILE MISSING with six suspects, true/false stamps and a verification table" width="100%"/>
344
+ </p>
345
+ <p align="center"><em>Text rendering with reasoning: logic puzzles in Chinese and English, solved correctly on the board</em></p>
346
+
347
+ <p align="center">
348
+ <img src="assets/showcase/edit_render.jpg" alt="Left: untextured grey 3D render of a lunar base with habitat modules, a rover and an astronaut. Right: the same scene as a photorealistic film still on the lunar surface" width="100%"/>
349
+ </p>
350
+ <p align="center"><em>Image editing, one reference: an untextured 3D render (left) turned into a film still of a lunar research base (right)</em></p>
351
+
352
+ <p align="center">
353
+ <img src="assets/showcase/edit_map.jpg" alt="Left: illustrated game map with a river, a waterfall, bridges, a castle, a village, a mine and a harbor, and a red arrow on the southern lake. Right: first-person 3D game view from the lake towards the waterfall, the suspension bridge, the mine and the distant castle, with the map as a minimap in the top-left corner" width="100%"/>
354
+ </p>
355
+ <p align="center"><em>Image editing, one reference: a game map (left) turned into a first-person 3D game view from the red arrow's position, with the map as a minimap (right)</em></p>
356
+
357
+ <p align="center">
358
+ <img src="assets/showcase/edit_multi.jpg" alt="Top: ten reference images, an empty sunlit room and nine pieces of furniture. Bottom: the empty room furnished with all nine pieces as a living room" width="100%"/>
359
+ </p>
360
+ <p align="center"><em>Image editing, ten references: an empty room and nine pieces of furniture (top) composed into one living room (bottom)</em></p>
361
+
362
+ ## License
363
+
364
+ - MiniMax-H3-Image is released under the [MiniMax-H3-Image Community License Agreement](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/LICENSE).
365
+ - The T2I PE Model ([MiniMax-H3-Image-PE](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE)) is part of MiniMax-H3-Image and is accordingly subject to [MiniMax-H3-Image Community License Agreement](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/LICENSE).
366
+ - The separate written authorization described in Section IV of the license is requested through [Application form](https://platform.minimax.io/console/license)
367
+
368
+ ## Contact Us
369
+
370
+ Contact us at [model@minimax.io](mailto:model@minimax.io).