Text Generation
Transformers
Safetensors
MiniMax H3
English
qwen3_5
image-text-to-text
prompt-expansion
text-to-image
fp4
sglang
conversational
8-bit precision
modelopt
Run this model with HF Jobs
Run MiniMaxAI/MiniMax-H3-Image-PE on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/MiniMaxAI/MiniMax-H3-Image-PE. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use MiniMaxAI/MiniMax-H3-Image-PE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MiniMaxAI/MiniMax-H3-Image-PE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-H3-Image-PE") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("MiniMaxAI/MiniMax-H3-Image-PE") model = AutoModelForMultimodalLM.from_pretrained("MiniMaxAI/MiniMax-H3-Image-PE", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MiniMaxAI/MiniMax-H3-Image-PE with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MiniMaxAI/MiniMax-H3-Image-PE" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MiniMaxAI/MiniMax-H3-Image-PE", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MiniMaxAI/MiniMax-H3-Image-PE
- SGLang
How to use MiniMaxAI/MiniMax-H3-Image-PE with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MiniMaxAI/MiniMax-H3-Image-PE" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MiniMaxAI/MiniMax-H3-Image-PE", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MiniMaxAI/MiniMax-H3-Image-PE" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MiniMaxAI/MiniMax-H3-Image-PE", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MiniMaxAI/MiniMax-H3-Image-PE with Docker Model Runner:
docker model run hf.co/MiniMaxAI/MiniMax-H3-Image-PE
Unify image editing terminology and auto aspect-ratio guidance
#3
by Ryan1122 - opened
Files changed (2)
11 unmodified lines121314151617181919 unmodified lines3940414243444546474849506 unmodified lines5758596061626364187 unmodified lines25225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432511 unmodified lines- minimax-h3- fp4- sglangbase_model:- Qwen/Qwen3.8-27B---<div align="center">19 unmodified linesUse MiniMax-H3-Image directly via API.- Global: [platform.minimax.io](https://platform.minimax.io/docs/guides/image-generation) | CN: [platform.minimax.cn](https://platform.minimax.cn/docs/guides/image-generation)API docs:- 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)- 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)- 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)## Introduction6 unmodified lines| Workflow | Input | Released assets || --- | --- | --- || **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 || **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.** |The examples below explain how to use MiniMax-H3-Image-PE and the image editing task prompt.187 unmodified linesIf you select an explicit ratio, the model preserves it exactly. If you select`adaptive`, the model determines a numeric ratio for the intended edited image.## Use with DiffusersMiniMax-H3-Image-PE can also run locally in Transformers through the[`diffusers/minimax-h3-image-pe-blocks`](https://huggingface.co/diffusers/minimax-h3-image-pe-blocks)Modular Diffusers blocks. The blocks use the released prompts and requestparameters for T2I PE and Image editing PE, and XGrammar constrains the answerto the JSON schema.### Load MiniMax-H3-Image-PE```bashpip install -U diffusers transformers xgrammar bitsandbytes kernels flash-linear-attention``````pythonimport torchfrom diffusers import ModularPipelinepe = ModularPipeline.from_pretrained("diffusers/minimax-h3-image-pe-blocks", trust_remote_code=True)pe.load_components(dtype=torch.bfloat16, device_map="cuda")```The FP4 weights stay in 4-bit and use about 19 GiB of GPU memory. GPUs withnative FP4 support run the NVFP4 weights directly; other GPUs use bitsandbytesFP4.### Expand a promptPass a request to run T2I PE:```pythonstate = pe(prompt="An orange tabby cat sleeping on a sunlit windowsill.")print(state.get("prompt"), state.get("aspect_ratio"))```Pass reference images to run Image editing PE. Refer to the images in theirsupplied order:```pythonstate = pe(prompt="Replace the bag in the first image with the bag in the second image.",image=["source.png", "bag.png"],aspect_ratio="adaptive",)print(state.get("prompt"), state.get("aspect_ratio"))```### Inputs and outputs| Name | Description || --- | --- || `prompt` | Input: the request or editing instruction. Output: the expanded caption. || `image` | One or more reference images (PIL images, paths or URLs). Selects Image editing PE. || `aspect_ratio` | Input, Image editing PE only: `adaptive` or an explicit `W:H` ratio. Output: the target ratio. || `enable_thinking` | Reasoning before the answer, `True` by default as in the released request. || `max_new_tokens` | Token budget, including thinking and the final answer. || `seed` | Seed for a reproducible expansion. || `reasoning` | Output: the model's reasoning. |Activations run in bf16, so outputs are not identical to the SGLang deploymentabove.## License- 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).- 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.- The separate written authorization described in Section IV of the license is requested through [platform.minimax.io/license](https://platform.minimax.io/license).## Contact UsContact us at [model@minimax.io](mailto:model@minimax.io).11 unmodified lines12131415161719 unmodified lines3738394041424344454647486 unmodified lines55565758596061626364656667187 unmodified lines25525625725825926026126211 unmodified lines- minimax-h3- fp4- sglang---<div align="center">19 unmodified linesUse MiniMax-H3-Image directly via API.- Global: [platform.minimax.io]() | CN: [platform.minimax.cn]()API docs:- Text-to-image: [EN-docs](), [CN-docs]()- Image editing: [EN-docs](), [CN-docs]()- Prompt expansion: [EN-docs](), [CN-docs]()## Introduction6 unmodified lines| Workflow | Input | Released assets || --- | --- | --- || **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 || **Image editing PE** | An editing instruction and reference images | A task prompt and message-assembly example for a vision-language model of your choice |T2I PE expands the scene, composition and visual details of a generation request.Image editing PE describes the intended changes while preserving relevant content from thereference images. **Image editing PE is still under development; this release provides itsprompt only.**The examples below explain how to use MiniMax-H3-Image-PE and the image editing task prompt.187 unmodified linesIf you select an explicit ratio, the model preserves it exactly. If you select`adaptive`, the model determines a numeric ratio for the intended edited image.## License- 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).- 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.- The separate written authorization described in Section IV of the license is requested through [platform.minimax.io/license](https://platform.minimax.io/license).
README.md+11-74
assets/minimax-h3-image.jpg

Large File Pointer Details
- SHA256: 5e007e09a3b4c943628b78db63646b1a1c515f363733efd0260bafa200311211
- Pointer size: 131 Bytes
- Size of remote file: 604 kB

Large File Pointer Details
- SHA256: c74f86206d2b63945ca68df78ac7e5c3d4ff0be82f948cb216fd1f4c7acfcf68
- Pointer size: 131 Bytes
- Size of remote file: 474 kB