MiniMax-H3 — combined (LoRA-fused · 8-bit conditioner · AoTI)
Joint video and synchronized soundtrack from a single denoising pass, packaged as a
deployment build of MiniMaxAI/MiniMax-H3
(diffusers modular layout). This repo is tuned for Hugging Face ZeroGPU Spaces: the whole
checkpoint is ~112 GB on the Hub (under the 150 GB per-Space storage quota), and each half of
the split pattern fits the 95 GiB ZeroGPU card with room to spare — so it runs comfortably and
fast, at ~40 s for a 5 s clip instead of the 5+ minutes a 30-step base run pays.
Full, unmodified bf16 partitions (including the 62 GiB bf16 conditioner) remain available in the
private backup addlabsviral/minimax-h3-combined-bkup.
Repo layout
| Folder | Content | Notes |
|---|---|---|
transformer/ | 50-block MiniMax-H3 transformer, bfloat16, LoRA-fused | 14 shards + index; the Turbo LoRA is folded into the weights (not a runtime adapter) |
text_encoder/ | Qwen3-VL conditioner, 8-bit | single 34.9 GB safetensors + quantization_config in config.json |
vae/ + audio_vae/ | video and audio autoencoders, float32, unquantized | joint video + soundtrack decode |
aoti/ | AoTI-compiled transformer-block package | aoti/package/submodules/transformer_blocks/package.pt2 |
lora/ | the Turbo LoRA checkpoint kept for reference | already folded — loading it again is not needed |
scheduler/, audio_scheduler/, tokenizer/, processor/ | small configs | untouched from base |
model_index.json, modular_model_index.json | diffusers modular indexes | point at transformer/ and text_encoder/ as-is |
transformer/ — LoRA-fused, 4-step inference
The
larryvrh/MiniMax-H3-Turbo-Lora
Turbo checkpoint (minimax_h3_turbo_4step_ema_ckpt850, the final EMA round, sharp at 4 steps)
is baked into the bf16 weights at conversion time — scale * (lora_B @ lora_A) is added into
every targeted projection (fused-QKV thirds, SwiGLU gate/value swap, AdaLN rows), so an adapter
wrap at load time is unnecessary and the checkpoint serves 4-step inference out of the box.
- 4 steps is the design point; 6 is a comfort setting, 28 is the unturbo fallback.
- Guidance-distilled: no CFG, no negative prompt — every step is one forward pass.
- 24 fps,
num_framesof the form17 * n + 5(2–15 s).
text_encoder/ — 8-bit bitsandbytes
The 62 GiB bf16 Qwen3-VL conditioner is served from a single safetensors file with a
bitsandbytes LLM.int8 quantization_config (load_in_8bit: true, threshold 6.0, no skip
modules). from_pretrained applies the quantization automatically at load, so the conditioner
runs in about a third of the memory and there is no manual quantize step. Requires
bitsandbytes and transformers==5.8.0.
aoti/ — compiled transformer blocks
One AOT-Inductor MiniMaxH3TransformerBlock package, shared byte-identically by all 50 blocks,
exported with a dynamic sequence dimension (original key bf16/torch2.11/sm120/dynamic,
flattened to aoti/, with the loader layout aoti/package/submodules/transformer_blocks/
preserved). It removes ~0.5 s/step of kernel-launch and epilogue overhead and is
card-specific: built for the ZeroGPU pool's RTX PRO 6000 (sm120) cards with torch 2.11.
Everything else falls back to eager safely.
Usage
import torch
from diffusers import MiniMaxH3ModularPipeline
pipe = MiniMaxH3ModularPipeline.from_pretrained("addlabsviral/minimax-h3-combined")
pipe.load_components() # text encoder quantizes to 8-bit per its config
state = pipe(
prompt="a cinematic drone shot over a neon city at night",
height=544, width=960,
num_frames=124, # 17 * n + 5
num_inference_steps=4, # the Turbo LoRA's design point
generator=torch.Generator("cpu").manual_seed(42),
)
For the split ZeroGPU pattern (conditioner Space + denoiser/reconstructor Space), point
H3_MODEL_REPO at this repo and H3_AOTI at the aoti/ package; modular_model_index.json
already resolves transformer/ and text_encoder/, so load_components fetches exactly the
subfolders each half declares.
Measured on ZeroGPU (rtx-pro-6000, bf16, everything resident)
| 30 steps (base) | 4 steps (this build) | |
|---|---|---|
| denoise, 960x544 × 124 frames | ~5.5 min | ~40 s |
| conditioning (8-bit Qwen3-VL) | ~45 s | ~45 s |
| cold start (112 GB pull) | — | a few minutes with warm Xet |
Provenance & license
- Base checkpoint:
MiniMaxAI/MiniMax-H3, MiniMax-H3 Community License (seeLICENSE). - Turbo LoRA folded into the transformer:
larryvrh/MiniMax-H3-Turbo-Lora. - AoTI package: compiled from this same bf16 partition for torch 2.11 / sm120 / dynamic sequence.