Finalize FastH3 OmniRef release model card
Browse files
README.md
CHANGED
|
@@ -1,237 +1,81 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
license_name: minimax-h3-community-license-agreement
|
|
|
|
| 4 |
base_model: MiniMaxAI/MiniMax-H3
|
| 5 |
tags:
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
- minimax-h3
|
| 15 |
---
|
| 16 |
|
| 17 |
# FastH3 NVFP4 VAE Decoder
|
| 18 |
|
| 19 |
-
NVFP4
|
| 20 |
-
[MiniMax-H3](https://huggingface.co/MiniMaxAI/MiniMax-H3) VAE, built for the FastH3
|
| 21 |
-
stacks in [FastVideo](https://github.com/hao-ai-lab/FastVideo).
|
| 22 |
|
| 23 |
-
|
| 24 |
-
decoders quantize every transformer-block linear (Q, K, V, attention output, FFN in,
|
| 25 |
-
FFN out) to NVFP4 W4A4: weights and activations both in E2M1 with E4M3 scales per
|
| 26 |
-
16 values. They were trained with quantization-aware distillation (QAD) against the
|
| 27 |
-
original full-precision decoder. `proj_in`, `proj_out`, norms, register tokens and
|
| 28 |
-
`post_quant_conv` stay in high precision. They decode the same latents as the
|
| 29 |
-
original VAE, so no DiT or encoder changes are needed.
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
| Tier | Folder | Decoder
|
| 34 |
-
|---|---|---:|---:|
|
| 35 |
-
| Quality
|
| 36 |
-
| Fast
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
| FastH3 V2 generations (9 clips, 480p) | 0.0104 / 37.9 dB | 0.0684 / 28.5 dB |
|
| 49 |
-
| FastH3 OmniRef generations (20 clips) | 0.0039 / 46.0 dB | 0.0276 / 36.1 dB |
|
| 50 |
-
| Real videos, VAE-encoded, held out (6 clips) | 0.0038 / 45.0 dB | 0.0330 / 34.3 dB |
|
| 51 |
-
|
| 52 |
-
These numbers were reproduced from both released formats through FastVideo's loader,
|
| 53 |
-
with the fused kernels. The two formats produced bit-identical frames on all 35 clips.
|
| 54 |
-
|
| 55 |
-
### Blind side-by-side votes
|
| 56 |
-
|
| 57 |
-
Raters watched decoded clips side by side without knowing which decoder made which
|
| 58 |
-
clip. The clips came from FastH3 V2 and OmniRef generations.
|
| 59 |
-
|
| 60 |
-
| Pairing | Result (wins–losses, ties) |
|
| 61 |
-
|---|---|
|
| 62 |
-
| Quality tier vs original decoder | 2–2, 7 ties: indistinguishable |
|
| 63 |
-
| Quality tier vs TAEH3 | 11–0 |
|
| 64 |
-
| Fast tier vs TAEH3 | 7–1 |
|
| 65 |
-
| Fast tier vs original decoder | 0–7, 3 ties |
|
| 66 |
|
| 67 |
-
|
| 68 |
|
| 69 |
-
|
| 70 |
-
NVFP4 kernels with every spatial tile batched in one decoder call:
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|---|---:|
|
| 74 |
-
| Original decoder, fp16, `torch.compile` | 0.98 |
|
| 75 |
-
| Quality tier (C-v4) | 0.53 |
|
| 76 |
-
| Fast tier (F8-v2) | 0.13 |
|
| 77 |
|
| 78 |
## Hardware
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
- sm_100: B200, GB200
|
| 83 |
-
- sm_120: RTX 50-series, RTX PRO 6000 Blackwell
|
| 84 |
-
- sm_121: DGX Spark (GB10)
|
| 85 |
-
|
| 86 |
-
On GB10, FastVideo uses the cuDNN FP4 GEMM backend; elsewhere it uses CUTLASS
|
| 87 |
-
through FlashInfer. The two produce bit-identical output. The fused decoder kernels
|
| 88 |
-
were benchmarked on GB200 and DGX Spark.
|
| 89 |
-
|
| 90 |
-
On GPUs without FP4 tensor cores (Hopper, Ada, Ampere and older) or on CPU/MPS, the
|
| 91 |
-
FP4 kernels are unavailable, so decoding with either format fails. There is no
|
| 92 |
-
automatic fallback. Use the original H3 VAE decoder on that hardware. The bf16 file
|
| 93 |
-
is still useful there as a source for other quantization schemes.
|
| 94 |
-
|
| 95 |
-
## How to use with FastVideo
|
| 96 |
-
|
| 97 |
-
> **Not merged upstream yet.** The loader lives on a FastVideo fork branch,
|
| 98 |
-
> [`aryan5v/FastVideo@aryan/h3-nvfp4-vae-spark`](https://github.com/aryan5v/FastVideo/tree/aryan/h3-nvfp4-vae-spark).
|
| 99 |
-
> The training and benchmark code is on
|
| 100 |
-
> [`aryan/h3-nvfp4-decoder`](https://github.com/aryan5v/FastVideo/tree/aryan/h3-nvfp4-decoder).
|
| 101 |
-
> Names and formats may change before the code is merged.
|
| 102 |
|
| 103 |
-
|
| 104 |
-
2. Download one file. The packed file is the usual choice:
|
| 105 |
-
|
| 106 |
-
```bash
|
| 107 |
-
hf download FastVideo/FastH3-NVFP4-VAE-Decoder quality-36L/decoder-nvfp4.safetensors \
|
| 108 |
-
--local-dir fasth3-nvfp4-vae
|
| 109 |
-
```
|
| 110 |
-
|
| 111 |
-
3. Point FastVideo at the file and run any MiniMax-H3 / FastH3 pipeline as usual:
|
| 112 |
-
|
| 113 |
-
```bash
|
| 114 |
-
export FASTVIDEO_H3_VAE_NVFP4_DECODER=$PWD/fasth3-nvfp4-vae/quality-36L/decoder-nvfp4.safetensors
|
| 115 |
-
```
|
| 116 |
-
|
| 117 |
-
The variable accepts either format, `decoder-nvfp4.safetensors` or
|
| 118 |
-
`decoder.safetensors`, directly.
|
| 119 |
-
|
| 120 |
-
When the VAE loads, FastVideo:
|
| 121 |
-
|
| 122 |
-
- swaps the decoder on the CPU before the VAE moves to the GPU, so the dense
|
| 123 |
-
decoder it replaces never reaches the GPU;
|
| 124 |
-
- uses the packed FP4 weights as they are, or packs the bf16 weights at load;
|
| 125 |
-
- skips the INT8 ConvRot decoder overlay;
|
| 126 |
-
- runs the decode in bf16 autocast, the precision the decoders were trained in.
|
| 127 |
|
| 128 |
-
|
| 129 |
-
whose loader read `.pt` files only. It converts `decoder.safetensors`; the packed
|
| 130 |
-
format needs the current loader.
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
|
| 135 |
-
36-block VAE from `MiniMaxAI/MiniMax-H3`. The 26-block light VAE in the FastH3
|
| 136 |
-
V2/Trim repos is too shallow, and the loader will refuse it.
|
| 137 |
-
- **Fast tier (8 blocks):** any H3 video VAE works, including the 26-block light
|
| 138 |
-
VAE that ships with FastH3 V2/Trim. The loader cuts the VAE down to 8 blocks.
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
| 143 |
-
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
|
| 148 |
-
|
| 149 |
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
fast-8L/decoder.safetensors # F8-v2, bf16 master weights (1.10 GB)
|
| 156 |
-
fast-8L/config.json
|
| 157 |
-
convert_to_fastvideo_pt.py # decoder.safetensors -> .pt, for older loaders
|
| 158 |
-
```
|
| 159 |
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
- **`decoder-nvfp4.safetensors` (packed):** pick this to run the model. It is the
|
| 163 |
-
smallest download and uses the least GPU memory while loading. It contains
|
| 164 |
-
Blackwell FP4 data, so it is Blackwell-only.
|
| 165 |
-
- **`decoder.safetensors` (bf16):** this is the reference copy. Use it to
|
| 166 |
-
re-quantize, fine-tune, run on a different FP4 kernel stack, or check the packed
|
| 167 |
-
file. FastVideo packs it at load with the same deterministic quantizer used in
|
| 168 |
-
training.
|
| 169 |
-
|
| 170 |
-
Peak memory while FastVideo loads the VAE (GB200; the encoder and the rest of the
|
| 171 |
-
VAE are included):
|
| 172 |
-
|
| 173 |
-
| | GPU, packed | GPU, bf16 | Host RAM (both formats) |
|
| 174 |
-
|---|---:|---:|---:|
|
| 175 |
-
| Quality tier, on the full 36-block VAE | 1.97 GiB | 9.78 GiB | about 23 GiB |
|
| 176 |
-
| Fast tier, on the 26-block light VAE | 0.99 GiB | 2.78 GiB | about 14 GiB |
|
| 177 |
-
|
| 178 |
-
The GPU memory after loading is the same for both formats. Host RAM peaks the same
|
| 179 |
-
way for both because the host VAE's own fp32 checkpoint is read in full.
|
| 180 |
-
|
| 181 |
-
### Layout
|
| 182 |
-
|
| 183 |
-
Both formats store tensors under `decoder.*` and `post_quant_conv.*`. The
|
| 184 |
-
safetensors header carries `format` and `nvfp4_metadata`, a JSON string with the
|
| 185 |
-
block size, activation scale, number of NVFP4 linears and decoder depth.
|
| 186 |
-
|
| 187 |
-
- **`decoder.safetensors`**
|
| 188 |
-
- `format`: `fastvideo_h3_decoder_nvfp4_deploy_v1`.
|
| 189 |
-
- The quantized linears' weights and biases are bf16.
|
| 190 |
-
- Every other tensor is fp32, the dtype it has in the trained decoder.
|
| 191 |
-
- **`decoder-nvfp4.safetensors`**
|
| 192 |
-
- `format`: `fastvideo_h3_decoder_nvfp4_packed_v1`.
|
| 193 |
-
- `nvfp4_metadata` also describes the layout (`packed_layout`) and the GPU and
|
| 194 |
-
FlashInfer version used to pack.
|
| 195 |
-
- Each quantized linear `<name>` has these tensors:
|
| 196 |
-
|
| 197 |
-
| Tensor | Contents |
|
| 198 |
-
|---|---|
|
| 199 |
-
| `<name>.packed_weight` | uint8 `[out, in/2]`, two E2M1 codes per byte (FlashInfer `fp4_quantize` order) |
|
| 200 |
-
| `<name>.weight_inv_scale` | per-16-element E4M3 block scales, stored as uint8, in FlashInfer's swizzled `SfLayout.layout_128x4` |
|
| 201 |
-
| `<name>.weight_global_sf` | fp32 scalar |
|
| 202 |
-
| `<name>.bias` | bf16 |
|
| 203 |
-
| `<name>.input_amax` | fp32 static activation range, unused with the unit activation scale these decoders use |
|
| 204 |
-
|
| 205 |
-
- Norms, `proj_in`, `proj_out`, register tokens and `post_quant_conv` stay
|
| 206 |
-
fp32. That is the dtype the decoder was trained and validated with, so the
|
| 207 |
-
output stays bit-identical.
|
| 208 |
-
|
| 209 |
-
## Training
|
| 210 |
-
|
| 211 |
-
- **Teacher:** the original 36-block MiniMax-H3 video decoder.
|
| 212 |
-
- **Students:**
|
| 213 |
-
- Quality tier: the full 36-block decoder.
|
| 214 |
-
- Fast tier: 8 evenly spaced blocks of the H3 decoder.
|
| 215 |
-
- Both were trained over several QAD rounds, each starting from the previous one.
|
| 216 |
-
- **Method:** quantization-aware distillation. The forward pass uses exactly the
|
| 217 |
-
NVFP4 numerics used at inference; gradients pass straight through the quantizer.
|
| 218 |
-
The loss is pixel L1 plus LPIPS. The activation global scale is fixed at 1.0 and
|
| 219 |
-
no Hadamard rotation is used.
|
| 220 |
-
- **Data:** decoder tiles cut from latents of FastH3 generations plus real video:
|
| 221 |
-
- FastH3 V1, V2 (NVFP4 and bf16), Trim (NVFP4, FP8, bf16) and OmniRef DiT
|
| 222 |
-
outputs, i.e. the latents the decoder sees in production;
|
| 223 |
-
- VAE-encoded real videos.
|
| 224 |
-
- **Checkpoint selection:** mean LPIPS on held-out FastH3 V2 and OmniRef latents.
|
| 225 |
-
|
| 226 |
-
## Limitations
|
| 227 |
-
|
| 228 |
-
- These are lossy decoders. Blind raters could not tell the quality tier from the
|
| 229 |
-
original. The fast tier lost every decisive vote against the original, so check
|
| 230 |
-
your own content before using it.
|
| 231 |
-
- They require Blackwell FP4 hardware, as described above.
|
| 232 |
-
- They only decode video. The encoder and the audio VAE are unchanged.
|
| 233 |
|
| 234 |
## License
|
| 235 |
|
| 236 |
-
|
| 237 |
-
[MiniMax-H3 Community License Agreement](https://huggingface.co/MiniMaxAI/MiniMax-H3).
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
license_name: minimax-h3-community-license-agreement
|
| 4 |
+
license_link: https://huggingface.co/MiniMaxAI/MiniMax-H3/blob/main/LICENSE
|
| 5 |
base_model: MiniMaxAI/MiniMax-H3
|
| 6 |
tags:
|
| 7 |
+
- video
|
| 8 |
+
- vae
|
| 9 |
+
- decoder
|
| 10 |
+
- nvfp4
|
| 11 |
+
- fp4
|
| 12 |
+
- blackwell
|
| 13 |
+
- fastvideo
|
| 14 |
+
- minimax-h3
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
# FastH3 NVFP4 VAE Decoder
|
| 18 |
|
| 19 |
+
Blackwell NVFP4 video decoders for MiniMax-H3 and FastH3, including OmniRef. They replace the video decoder while retaining the reference encoder, audio VAE and video latent space.
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
[FastVideo](https://github.com/hao-ai-lab/FastVideo) · [OmniRef decoder setup](https://github.com/hao-ai-lab/FastVideo/blob/main/docs/inference/fasth3_omniref.md) · [OmniRef release collection](https://huggingface.co/collections/FastVideo/fasth3-omniref)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
## Choose a decoder
|
| 24 |
|
| 25 |
+
| Tier | Folder | Decoder layers | Resident decoder weights |
|
| 26 |
+
| --- | --- | ---: | ---: |
|
| 27 |
+
| Quality | `quality-36L/` | 36 | 1.29 GiB |
|
| 28 |
+
| Fast | `fast-8L/` | 8 | 0.31 GiB |
|
| 29 |
|
| 30 |
+
Choose the quality tier for closer reconstruction or the fast tier for lower decode cost with a quality tradeoff. Both tiers are lossy.
|
| 31 |
|
| 32 |
+
## Use with FastVideo
|
| 33 |
|
| 34 |
+
Download a packed decoder:
|
| 35 |
|
| 36 |
+
```bash
|
| 37 |
+
hf download FastVideo/FastH3-NVFP4-VAE-Decoder \
|
| 38 |
+
quality-36L/decoder-nvfp4.safetensors --local-dir ./fasth3-vae
|
| 39 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
Follow the [FastVideo OmniRef guide](https://github.com/hao-ai-lab/FastVideo/blob/main/docs/inference/fasth3_omniref.md) and pass the downloaded file with `--decoder` to `examples/inference/basic/basic_fasth3_omniref_pdd.py`. Use `fast-8L/decoder-nvfp4.safetensors` to select the fast tier instead.
|
| 42 |
|
| 43 |
+
The 36-layer decoder needs a full 36-layer MiniMax-H3 host VAE. The 8-layer tier also works with the light H3 VAE. The OmniRef guide explains model composition and device profiles.
|
|
|
|
| 44 |
|
| 45 |
+
For UniServe deployment of the complete OmniRef model on GB200/B200, RTX PRO 6000 Blackwell or Hopper, follow the [UniServe guide](https://github.com/hao-ai-lab/uniserve/blob/main/docs/minimax_h3/minimax_h3.md) with the [BF16 model](https://huggingface.co/FastVideo/FastVideo-FastH3-Omni-8-Step-V1). These files are FastVideo decoder components, not complete diffusion checkpoints.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
## Hardware
|
| 48 |
|
| 49 |
+
The FP4 decoder kernels require NVIDIA Blackwell: GB200/B200, RTX PRO 6000 Blackwell, RTX 50-series or DGX Spark (GB10). Follow the [local OmniRef guide](https://github.com/hao-ai-lab/FastVideo/blob/main/docs/inference/fasth3_omniref.md#device-profiles) for Spark and RTX 5090 setup. Hopper and older GPUs should use the original H3 video decoder.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
## Files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
+
Each tier includes:
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
- `decoder-nvfp4.safetensors`: packed NVFP4 weights for inference.
|
| 56 |
+
- `decoder.safetensors`: BF16 master weights.
|
| 57 |
+
- `config.json`: decoder architecture and quantization configuration.
|
| 58 |
|
| 59 |
+
## Quality and speed
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
+
Reconstruction against the original FP32 decoder on the same latents; lower LPIPS and higher PSNR are better:
|
| 62 |
|
| 63 |
+
| Evaluation clips | Quality tier LPIPS / PSNR | Fast tier LPIPS / PSNR |
|
| 64 |
+
| --- | ---: | ---: |
|
| 65 |
+
| FastH3 V2 generations, 9 clips at 480p | 0.0104 / 37.9 dB | 0.0684 / 28.5 dB |
|
| 66 |
+
| FastH3 OmniRef generations, 20 clips | 0.0039 / 46.0 dB | 0.0276 / 36.1 dB |
|
| 67 |
+
| Real videos, VAE-encoded, 6 held-out clips | 0.0038 / 45.0 dB | 0.0330 / 34.3 dB |
|
| 68 |
|
| 69 |
+
Warm video-decode time for one 832×480, 124-frame clip on one GB200, using FastVideo's fused NVFP4 kernels and batching all spatial tiles in one decoder call:
|
| 70 |
|
| 71 |
+
| Decoder | Seconds per clip |
|
| 72 |
+
| --- | ---: |
|
| 73 |
+
| Original FP16 decoder with `torch.compile` | 0.98 |
|
| 74 |
+
| Quality, 36 layers | 0.53 |
|
| 75 |
+
| Fast, 8 layers | 0.13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
+
These are decoder-only measurements. Full video/audio generation also includes encoding, denoising and media output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
## License
|
| 80 |
|
| 81 |
+
Use of these weights is governed by the [MiniMax-H3 Community License Agreement](https://huggingface.co/MiniMaxAI/MiniMax-H3/blob/main/LICENSE).
|
|
|