Instructions to use MiniMaxAI/MiniMax-H3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use MiniMaxAI/MiniMax-H3 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("MiniMaxAI/MiniMax-H3", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
Some question about VIDEO_PROMPT_WRITING_GUIDE_ref_en.md
Hi there,
I want to ask some questions about the ref2va prompt writing guide.
https://huggingface.co/MiniMaxAI/MiniMax-H3/blob/main/docs/VIDEO_PROMPT_WRITING_GUIDE_ref_en.md
- subject_definitions
The template writes:
<Subject 3> is the young blonde woman in <Video 1>, with long blonde hair and a light-pink button-down shirt with rolled-up sleeves.
I want to ask if <Subject 3> is wearing <Subject 5>, should I write something like below? Is this kind of nesting definition allowed?
<Subject 3> is the young blonde woman in <Video 1>, with long blonde hair and a light-pink button-down shirt with rolled-up sleeves. She also wears <Subject 5>.
- retention_analysis
The template writes:
<Subject 1> (appears in [Shot 1], [Shot 2], [Shot 3]): fully_preserved - the exposed brick wall, orange tufted sofa, patterned pillows, neon sign, and wooden coffee table are retained.
I want to ask if <Subject 1> is fully shown in [Shot 1] and [Shot 2], but it is partially shown in [Shot 3], for example only the wooden coffee table is shown in the frame. Should I write something like below? Or only one line for one subject is allowed?
<Subject 1> (appears in [Shot 1], [Shot 2]): fully_preserved - the exposed brick wall, orange tufted sofa, patterned pillows, neon sign, and wooden coffee table are retained.
<Subject 1> (appears in [Shot 3]): partially_preserved- the wooden coffee table is retained.
- Is the above prompts really really important? Or am I just overthinking things?
Thank you
Another question:
What is the purpose of repeating the same visual description across subject_definitions, retention_analysis, and detailed_description?
In the template:
subject_definitions:
<Subject 1> is the coffee-shop environment in <Picture 1>, featuring an exposed brick wall, an orange tufted sofa with patterned pillows, a neon sign, and a wooden coffee table.
retention_analysis:
<Subject 1> (appears in [Shot 1], [Shot 2], [Shot 3]): fully_preserved - the exposed brick wall, orange tufted sofa, patterned pillows, neon sign, and wooden coffee table are retained.
detailed_description:
...
[Shot 1] A medium shot establishes <Subject 1>, the coffee shop with its exposed brick wall, orange tufted sofa, patterned pillows, neon sign, and wooden coffee table.
The same visual details seem to be repeated in all three sections. Is there a specific reason for this redundancy? Do these descriptions serve different purposes for the video generation model, or would it be better to avoid repeating the same attributes?
Hi, thank you for your questions.
1. Can Subjects reference each other?
Yes. If <Subject 5> is a separately referenced outfit that needs to be tracked, define it separately and state its relationship to <Subject 3>:
<Subject 3> is the young blonde woman in <Video 1>, ...
<Subject 5> is the referenced outfit in <Picture 2>, worn by <Subject 3>.
If the outfit does not need to be tracked independently, simply include its features in <Subject 3> instead.
2. Does partial visibility mean partially_preserved?
No. partially_preserved means that some defined reference characteristics are changed, omitted, or only partly used. It does not mean that only part of the Subject is visible in a particular shot.
If the full coffee-shop environment is retained but [Shot 3] only shows the coffee table, you can still use one entry:
<Subject 1> (appears in [Shot 1], [Shot 2], [Shot 3]): fully_preserved - the referenced coffee-shop environment is retained.
Describe the tighter framing of [Shot 3] in detailed_description. There is usually no need to split one Subject into separate retention entries by shot.
3. How important is the format?
The structure and label consistency are important, but you do not need to copy the template word for word. The key points are:
- Keep each label’s meaning consistent.
- State relationships between Subjects clearly.
- Distinguish preservation, partial preservation, and attribute transfer correctly.
- Use each label consistently in the relevant shots.
4. Why is visual information repeated?
Each section has a different purpose:
subject_definitionsdefines the referenced content and its characteristics.retention_analysisexplains how those characteristics are preserved or changed.detailed_descriptiondescribes how the content appears in each shot.
Some repetition is therefore intentional, but the same description does not need to be copied verbatim. Describe the relevant characteristics at the Subject’s first clear appearance, then reuse the label in later shots.