Unify image editing terminology and auto aspect-ratio guidance

#3
by Ryan1122 - opened
Files changed (2) hide show
  1. README.md +11 -74
  2. assets/minimax-h3-image.jpg +2 -2
README.md CHANGED
@@ -12,8 +12,6 @@ tags:
12
  - minimax-h3
13
  - fp4
14
  - sglang
15
- base_model:
16
- - Qwen/Qwen3.8-27B
17
  ---
18
 
19
  <div align="center">
@@ -39,12 +37,12 @@ base_model:
39
 
40
  Use MiniMax-H3-Image directly via API.
41
 
42
- - Global: [platform.minimax.io](https://platform.minimax.io/docs/guides/image-generation) | CN: [platform.minimax.cn](https://platform.minimax.cn/docs/guides/image-generation)
43
 
44
  API docs:
45
- - 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)
46
- - 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)
47
- - 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)
48
 
49
  ## Introduction
50
 
@@ -57,8 +55,13 @@ This repository covers two workflows:
57
 
58
  | Workflow | Input | Released assets |
59
  | --- | --- | --- |
60
- | **Text-to-image (T2I) PE** | A text instruction | MiniMax-H3-Image-PE weights (fine-tuned from [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B), FP4), task and system prompts, and a client example |
61
- | **Image editing PE** | An editing instruction and reference images | A task prompt and message-assembly example for a vision-language model of your choice. **Image editing PE is still under development; this release provides its prompt only.** |
 
 
 
 
 
62
 
63
  The examples below explain how to use MiniMax-H3-Image-PE and the image editing task prompt.
64
 
@@ -252,74 +255,8 @@ language you request. `target_aspect_ratio` is a positive-integer `W:H` string.
252
  If you select an explicit ratio, the model preserves it exactly. If you select
253
  `adaptive`, the model determines a numeric ratio for the intended edited image.
254
 
255
- ## Use with Diffusers
256
-
257
- MiniMax-H3-Image-PE can also run locally in Transformers through the
258
- [`diffusers/minimax-h3-image-pe-blocks`](https://huggingface.co/diffusers/minimax-h3-image-pe-blocks)
259
- Modular Diffusers blocks. The blocks use the released prompts and request
260
- parameters for T2I PE and Image editing PE, and XGrammar constrains the answer
261
- to the JSON schema.
262
-
263
- ### Load MiniMax-H3-Image-PE
264
-
265
- ```bash
266
- pip install -U diffusers transformers xgrammar bitsandbytes kernels flash-linear-attention
267
- ```
268
-
269
- ```python
270
- import torch
271
- from diffusers import ModularPipeline
272
-
273
- pe = ModularPipeline.from_pretrained("diffusers/minimax-h3-image-pe-blocks", trust_remote_code=True)
274
- pe.load_components(dtype=torch.bfloat16, device_map="cuda")
275
- ```
276
-
277
- The FP4 weights stay in 4-bit and use about 19 GiB of GPU memory. GPUs with
278
- native FP4 support run the NVFP4 weights directly; other GPUs use bitsandbytes
279
- FP4.
280
-
281
- ### Expand a prompt
282
-
283
- Pass a request to run T2I PE:
284
-
285
- ```python
286
- state = pe(prompt="An orange tabby cat sleeping on a sunlit windowsill.")
287
- print(state.get("prompt"), state.get("aspect_ratio"))
288
- ```
289
-
290
- Pass reference images to run Image editing PE. Refer to the images in their
291
- supplied order:
292
-
293
- ```python
294
- state = pe(
295
- prompt="Replace the bag in the first image with the bag in the second image.",
296
- image=["source.png", "bag.png"],
297
- aspect_ratio="adaptive",
298
- )
299
- print(state.get("prompt"), state.get("aspect_ratio"))
300
- ```
301
-
302
- ### Inputs and outputs
303
-
304
- | Name | Description |
305
- | --- | --- |
306
- | `prompt` | Input: the request or editing instruction. Output: the expanded caption. |
307
- | `image` | One or more reference images (PIL images, paths or URLs). Selects Image editing PE. |
308
- | `aspect_ratio` | Input, Image editing PE only: `adaptive` or an explicit `W:H` ratio. Output: the target ratio. |
309
- | `enable_thinking` | Reasoning before the answer, `True` by default as in the released request. |
310
- | `max_new_tokens` | Token budget, including thinking and the final answer. |
311
- | `seed` | Seed for a reproducible expansion. |
312
- | `reasoning` | Output: the model's reasoning. |
313
-
314
- Activations run in bf16, so outputs are not identical to the SGLang deployment
315
- above.
316
-
317
  ## License
318
 
319
  - MiniMax-H3-Image-PE is part of MiniMax-H3-Image and is released under the [MiniMax-H3-Image Community License Agreement](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/LICENSE).
320
  - MiniMax-H3-Image-PE is derived from [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B), which is licensed under the Apache 2.0 License.
321
  - The separate written authorization described in Section IV of the license is requested through [platform.minimax.io/license](https://platform.minimax.io/license).
322
-
323
- ## Contact Us
324
-
325
- Contact us at [model@minimax.io](mailto:model@minimax.io).
 
12
  - minimax-h3
13
  - fp4
14
  - sglang
 
 
15
  ---
16
 
17
  <div align="center">
 
37
 
38
  Use MiniMax-H3-Image directly via API.
39
 
40
+ - Global: [platform.minimax.io]() | CN: [platform.minimax.cn]()
41
 
42
  API docs:
43
+ - Text-to-image: [EN-docs](), [CN-docs]()
44
+ - Image editing: [EN-docs](), [CN-docs]()
45
+ - Prompt expansion: [EN-docs](), [CN-docs]()
46
 
47
  ## Introduction
48
 
 
55
 
56
  | Workflow | Input | Released assets |
57
  | --- | --- | --- |
58
+ | **Text-to-image (T2I) PE** | A text instruction | MiniMax-H3-Image-PE weights (fine-tuned from Qwen3.8-27B, FP4), task and system prompts, and a client example |
59
+ | **Image editing PE** | An editing instruction and reference images | A task prompt and message-assembly example for a vision-language model of your choice |
60
+
61
+ T2I PE expands the scene, composition and visual details of a generation request.
62
+ Image editing PE describes the intended changes while preserving relevant content from the
63
+ reference images. **Image editing PE is still under development; this release provides its
64
+ prompt only.**
65
 
66
  The examples below explain how to use MiniMax-H3-Image-PE and the image editing task prompt.
67
 
 
255
  If you select an explicit ratio, the model preserves it exactly. If you select
256
  `adaptive`, the model determines a numeric ratio for the intended edited image.
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
  ## License
259
 
260
  - MiniMax-H3-Image-PE is part of MiniMax-H3-Image and is released under the [MiniMax-H3-Image Community License Agreement](https://huggingface.co/MiniMaxAI/MiniMax-H3-Image/blob/main/LICENSE).
261
  - MiniMax-H3-Image-PE is derived from [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B), which is licensed under the Apache 2.0 License.
262
  - The separate written authorization described in Section IV of the license is requested through [platform.minimax.io/license](https://platform.minimax.io/license).
 
 
 
 
assets/minimax-h3-image.jpg CHANGED

Git LFS Details

  • SHA256: 5e007e09a3b4c943628b78db63646b1a1c515f363733efd0260bafa200311211
  • Pointer size: 131 Bytes
  • Size of remote file: 604 kB

Git LFS Details

  • SHA256: c74f86206d2b63945ca68df78ac7e5c3d4ff0be82f948cb216fd1f4c7acfcf68
  • Pointer size: 131 Bytes
  • Size of remote file: 474 kB