Status: paused. This repository is temporarily paused and kept as a technical reference only. The active serving line is mi308x-llm-lab (Qwen3.8-Flash-Next preparation + frozen Qwen3.8-27B / DeepSeek-V4-Flash-0731 recipes on the same GPU class with vLLM).
Single-GPU MiniMax H3 video generation on AMD Instinct (ROCm). Gradio app + Python service with lazy loading, hybrid precision, and 12x Turbo distilled sampling.
This repository runs MiniMax H3 (a 33B audio-video joint diffusion transformer) on a single AMD Instinct accelerator via DiffSynth-Studio. It ships a reusable inference service with task-aware model switching, hybrid precision (BF16 generation core + NF4 encoders), and the 4-step Turbo distilled LoRA (~12x speedup, near-lossless quality).
t2va), first/last-frame (fl2va), reference-driven (ref2va), with native stereo audio.del + gc + empty_cache) when the task changes.gpu (weights resident, fastest), cpu (memory-resident), disk (slowest, smallest footprint).scripts/03_run.py) for headless use.| Component | Notes |
|---|---|
| GPU | AMD Instinct MI300X / MI308X (192 GB) |
| ROCm | 6.2+ (system-installed; do not replace torch) |
| Python | 3.11+ |
| DiffSynth-Studio | installed from source (.[quant]) |
# 1. Probe the environment (ROCm / torch / disk)
bash scripts/00_check_env.sh
# 2. Download weights — hybrid is the recommended default (~87 GB)
bash scripts/01_download_model.sh # MODE=hybrid (default)
# 3. Install DiffSynth-Studio (ROCm)
bash scripts/02_install_diffsynth.sh
# 4. Run a quick text-to-video generation
python scripts/03_run.py --task t2va --prompt "A cat running on grass, cinematic" --output out.mp4
# 5. Or launch the Gradio UI
python app.py
| Precision | Disk | Peak VRAM | Quality | Use case |
|---|---|---|---|---|
| hybrid (default) | ~87 GB | ~100 GB+ | ≈ full | recommended; BF16 generation core + NF4 encoders |
| nf4 | ~33 GB | low | slightly lower | tight disk/VRAM |
| bf16 | ~134 GB | high (offload needed) | highest | maximum quality |
| Task | Input | Output |
|---|---|---|
t2va | text | video + stereo audio |
fl2va | text + first/last frame images | video + stereo audio |
ref2va | text + reference image/video/audio | video + stereo audio |
Reference-driven generation is the recommended way to preserve character
identity across shots: fl2va treats the image as a keyframe (the model may
drift), while ref2va locks the subject's identity (face/clothing/marks)
without locking lighting.
| Mode | First step | Steady state | Resident VRAM |
|---|---|---|---|
gpu offload | 3.2s | 2.7s/step | 83 GB |
cpu offload | 24s (cold load) | 2.7s/step | idle drops to 1.6 GB |
Turbo sampling: 7s HD clip (175 frames @768p) ≈ 2.7 min vs ~33 min at 50 steps.
core.MiniMaxH3Service is the inference core shared by the CLI and the Gradio
app:
from core import MiniMaxH3Service
service = MiniMaxH3Service(precision="hybrid", offload="gpu", turbo=True)
video, audio = service.generate(
task="t2va",
prompt="A cat running on grass, cinematic",
num_frames=124,
num_inference_steps=4,
seed=0,
)
print(service.gpu_memory_report())
minimax-h3-mi308x/
├── app.py # Gradio UI + API endpoint
├── core.py # inference core: lazy load / task switch / VRAM management
├── requirements.txt # runtime dependencies
└── scripts/
├── 00_check_env.sh # environment probe
├── 01_download_model.sh # weight download (hybrid / nf4 / bf16)
├── 02_install_diffsynth.sh # DiffSynth-Studio install (ROCm)
├── 03_run.py # CLI inference
├── 04_serve_vllm_omni.sh # optional: OpenAI-compatible /v1/videos via vLLM-Omni
├── 05_ref2va.py # reference-driven generation CLI
└── serve.sh # background service launcher
H3-Context-IR / H3-Regenerate-2K and requires the official MiniMax API.mi308x-llm-lab — companion repo: LLM serving lab on the same GPU class
with vLLM (Qwen3.8 series + frozen DeepSeek-V4-Flash-0731 recipe)Apache-2.0. See LICENSE. Model weights are subject to the MiniMax Community License and are downloaded at runtime.
8 commits
Python
68.9%
Shell
31.1%
Status: paused. This repository is temporarily paused and kept as a technical reference only. The active serving line is mi308x-llm-lab (Qwen3.8-Flash-Next preparation + frozen Qwen3.8-27B / DeepSeek-V4-Flash-0731 recipes on the same GPU class with vLLM).
Single-GPU MiniMax H3 video generation on AMD Instinct (ROCm). Gradio app + Python service with lazy loading, hybrid precision, and 12x Turbo distilled sampling.
This repository runs MiniMax H3 (a 33B audio-video joint diffusion transformer) on a single AMD Instinct accelerator via DiffSynth-Studio. It ships a reusable inference service with task-aware model switching, hybrid precision (BF16 generation core + NF4 encoders), and the 4-step Turbo distilled LoRA (~12x speedup, near-lossless quality).
t2va), first/last-frame (fl2va), reference-driven (ref2va), with native stereo audio.del + gc + empty_cache) when the task changes.gpu (weights resident, fastest), cpu (memory-resident), disk (slowest, smallest footprint).scripts/03_run.py) for headless use.| Component | Notes |
|---|---|
| GPU | AMD Instinct MI300X / MI308X (192 GB) |
| ROCm | 6.2+ (system-installed; do not replace torch) |
| Python | 3.11+ |
| DiffSynth-Studio | installed from source (.[quant]) |
# 1. Probe the environment (ROCm / torch / disk)
bash scripts/00_check_env.sh
# 2. Download weights — hybrid is the recommended default (~87 GB)
bash scripts/01_download_model.sh # MODE=hybrid (default)
# 3. Install DiffSynth-Studio (ROCm)
bash scripts/02_install_diffsynth.sh
# 4. Run a quick text-to-video generation
python scripts/03_run.py --task t2va --prompt "A cat running on grass, cinematic" --output out.mp4
# 5. Or launch the Gradio UI
python app.py
| Precision | Disk | Peak VRAM | Quality | Use case |
|---|---|---|---|---|
| hybrid (default) | ~87 GB | ~100 GB+ | ≈ full | recommended; BF16 generation core + NF4 encoders |
| nf4 | ~33 GB | low | slightly lower | tight disk/VRAM |
| bf16 | ~134 GB | high (offload needed) | highest | maximum quality |
| Task | Input | Output |
|---|---|---|
t2va | text | video + stereo audio |
fl2va | text + first/last frame images | video + stereo audio |
ref2va | text + reference image/video/audio | video + stereo audio |
Reference-driven generation is the recommended way to preserve character
identity across shots: fl2va treats the image as a keyframe (the model may
drift), while ref2va locks the subject's identity (face/clothing/marks)
without locking lighting.
| Mode | First step | Steady state | Resident VRAM |
|---|---|---|---|
gpu offload | 3.2s | 2.7s/step | 83 GB |
cpu offload | 24s (cold load) | 2.7s/step | idle drops to 1.6 GB |
Turbo sampling: 7s HD clip (175 frames @768p) ≈ 2.7 min vs ~33 min at 50 steps.
core.MiniMaxH3Service is the inference core shared by the CLI and the Gradio
app:
from core import MiniMaxH3Service
service = MiniMaxH3Service(precision="hybrid", offload="gpu", turbo=True)
video, audio = service.generate(
task="t2va",
prompt="A cat running on grass, cinematic",
num_frames=124,
num_inference_steps=4,
seed=0,
)
print(service.gpu_memory_report())
minimax-h3-mi308x/
├── app.py # Gradio UI + API endpoint
├── core.py # inference core: lazy load / task switch / VRAM management
├── requirements.txt # runtime dependencies
└── scripts/
├── 00_check_env.sh # environment probe
├── 01_download_model.sh # weight download (hybrid / nf4 / bf16)
├── 02_install_diffsynth.sh # DiffSynth-Studio install (ROCm)
├── 03_run.py # CLI inference
├── 04_serve_vllm_omni.sh # optional: OpenAI-compatible /v1/videos via vLLM-Omni
├── 05_ref2va.py # reference-driven generation CLI
└── serve.sh # background service launcher
H3-Context-IR / H3-Regenerate-2K and requires the official MiniMax API.mi308x-llm-lab — companion repo: LLM serving lab on the same GPU class
with vLLM (Qwen3.8 series + frozen DeepSeek-V4-Flash-0731 recipe)Apache-2.0. See LICENSE. Model weights are subject to the MiniMax Community License and are downloaded at runtime.
8 commits
Python
68.9%
Shell
31.1%