Retrieved article excerpt
Open article · Retrieved 2026-11-07T15:23:18.220981+00:00
# HyperFlow H3 Flash
HyperFlow H3 Flash is [Video Rebirth](https://www.videorebirth.com/)'s compressed, few-step version of [MiniMax-H3](https://huggingface.co/MiniMaxAI/MiniMax-H3). It generates video and synchronized stereo audio together.
**[Showcase](https://www.videorebirth.com/lp/hyperflow-flash)** · **[Weights (Hugging Face)](https://huggingface.co/VideoRebirthAI/hyperflow-h3-flash)** · **[ComfyUI nodes](https://github.com/Video-Rebirth/ComfyUI-HyperFlow-Flash)** · **[GGUF setup guide](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/integrations/README.md)** · **[8-step LoRA for full-size MiniMax-H3](https://github.com/Video-Rebirth/hyperflow)**
- **Output:** 5.2–15 s of video at 24 fps (1344×768 by default) with a 32 kHz stereo soundtrack.
- **Sampling:** 4, 6 (default), or 8 steps, without classifier-free guidance (CFG).
- **Speed (5.2 s clip, 6 steps):** 8.7 s on 4× B200, 36 s on 1× H200, 92 s on 1× RTX 5090.
- **Real time on 4× Blackwell GPUs:** [NVIDIA SOL-H3](https://github.com/NVlabs/Sana/tree/sol-engine/models/minimax_h3/HyperFlow-Flash) runs HyperFlow H3 Flash in real time on 4× B-series GPUs. SOL-H3 is our inference-acceleration partner and supports this model from day 0.
- **Model size:** 13.7B (`fl2va`) or 13.9B (`ref2va`) parameters, less than half of the ~31B MiniMax-H3 transformer.
- **Minimum footprint:** `Q4_K_M` is **9.1 GB** (`Q8_0` is 14.9 GB). It runs on 24 GB and 32 GB GPUs in PCs with **16 GB of system RAM**. 16 GB GPUs are not measured yet.
## Supported Tasks
| Task | Input | ComfyUI template | GGUF | Python INT8 |
| --- | --- | --- | --- | --- |
| `t2va` | Text prompt | `hyperflow_t2v` | Yes | Yes |
| `fl2va` | Prompt + first keyframe, or first and last keyframes | `hyperflow_i2v`, `hyperflow_flf2v` | Yes | Yes |
| `ref2va` | Prompt + up to 12 references | `hyperflow_ref2v` | Images only | Images, videos, and audio |
---
## Choose a Runtime
**Decision rule:** Use **GGUF** on PCs with 64 GB of system RAM or less. Use **INT8 convrot** on data-center GPUs, or on 24 GB+ RTX GPUs with at least 69 GiB of system RAM.
All weights are in [`VideoRebirthAI/hyperflow-h3-flash`](https://huggingface.co/VideoRebirthAI/hyperflow-h3-flash).
| | GGUF | INT8 convrot |
| --- | --- | --- |
| **Runtime** | [ComfyUI, Unsloth Studio, stable-diffusion.cpp](https://github.com/Video-Rebirth/hyperflow-h3-flash#comfyui-unsloth-studio--stable-diffusioncpp-gguf) ([setup guide](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/integrations/README.md)) | [This Python package](https://github.com/Video-Rebirth/hyperflow-h3-flash#python-package-int8-convrot) (`hyperflow-h3-flash` CLI and `diffusers`) |
| **Precision & size** | `Q3_K_M` to `Q8_0` (7.2–15.2 GB) | W8A8 INT8 + low-rank (~16 GB) |
| **Hub folders** | `fl2va_gguf/`, `ref2va_gguf/` | `fl2va_int8_convrot/`, `ref2va_int8_convrot/` |
| **`ref2va` inputs** | Images | Images, videos, and audio |
| **Target GPU** | Consumer RTX GPUs (measured on 24 GB and 32 GB) | H100 / H200 / B200 / B300 (1–8 GPUs), or 24 GB+ RTX GPUs |
| **System RAM** | 16 GB+ | ~16 GiB without offload; ≥ 69 GiB (`fp8` text encoder) or ≥ 91 GiB (`bf16`) with offload |
---
## GGUF Runtimes (ComfyUI, Unsloth Studio, stable-diffusion.cpp)
| Quant | `fl2va_gguf/` | `ref2va_gguf/` | When to use |
| --- | --- | --- | --- |
| **`Q4_K_M`** | **9.1 GB** | **9.2 GB** | **Recommended default for 24 GB GPUs** |
| `Q8_0` | 14.9 GB | 15.2 GB | Closest to full precision when VRAM and system RAM fit |
| `Q3_K_M` | 7.2 GB | 7.4 GB | Smallest footprint (`Q4_K_S`, `Q5_K_M`, and `Q6_K` are also available) |
**Full setup guide: [`integrations/README.md`](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/integrations/README.md).** Quick start:
- **ComfyUI ([`Video-Rebirth/ComfyUI-HyperFlow-Flash`](https://github.com/Video-Rebirth/ComfyUI-HyperFlow-Flash)):**
1. Clone [ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF) and [ComfyUI-HyperFlow-Flash](https://github.com/Video-Rebirth/ComfyUI-HyperFlow-Flash) into `ComfyUI/custom_nodes/`.
2. Download the 15.7 GB `qwen3vl_32b_minimax_h3_nvfp4_awq` text encoder.
3. On 16 GB or 32 GB PCs, start ComfyUI with `python main.py --fast-disk`.
4. Open **Workflow > Browse Templates > ComfyUI-HyperFlow-Flash** and select `hyperflow_t2v`, `hyperflow_i2v`, `hyperflow_flf2v`, or `hyperflow_ref2v`.
- **Unsloth Studio ([setup guide](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/integrations/README.md#unsloth-studio)):**
1. Point `SD_CLI_PATH` at the patched `sd-cli` binary and run `unsloth studio`.
2. Load `VideoRebirthAI/hyperflow-h3-flash` (`fl2va_gguf/` or `ref2va_gguf/`).
3. Studio downloads the companion text encoder and VAEs automatically. It runs the built-in 6-step schedule at `CFG = 1`.
- **stable-diffusion.cpp ([`integrations/stable-diffusion.cpp/`](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/integrations/stable-diffusion.cpp)):**
Apply `hyperflow-two-time.patch` to upstream commit `3be2378`. The patch adds the two-time `(t, r)` embedder, low-rank linear layers, the default 6-step schedule from GGUF metadata, and 32-bit matmul token splitting for long clips.
---
## Python Package (INT8 convrot)
### Install
```
pip install git+https://github.com/Video-Rebirth/hyperflow-h3-flash
pip install "hyperflow-h3-flash[hopper] @ git+https://github.com/Video-Rebirth/hyperflow-h3-flash" # H100 / H200: FlashAttention-3
pip install "hyperflow-h3-flash[fp8] @ git+https://github.com/Video-Rebirth/hyperflow-h3-flash" # --text-encoder-precision fp8
```
- **Requirements:** Python 3.10+, PyTorch 2.6+ with CUDA and Triton (`pip install triton-windows` on native Windows), an Ampere or newer NVIDIA GPU, and `diffusers >= 0.40`. Multi-GPU (`--gpus` > 1) requires Linux or WSL2 (raise `memory=` in `%UserProfile%\.wslconfig` on WSL2).
- **First-run download:** ~90 GB, or ~68 GB with `--text-encoder-precision fp8`. This includes the MiniMax-H3 text encoder, VAEs, and the 16 GB HyperFlow INT8 transformer for the selected task. The 62 GB base transformer is never downloaded.
- **First-run compilation:** Triton INT8 kernels compile on first use (~1 min).
### Command Line
Run `hyperflow-h3-flash` or `python -m hyperflow_h3_flash`:
```
# Text to video + audio (t2va)
hyperflow-h3-flash --prompt "A chef slides a steaming bowl of ramen across a wooden counter; rain taps on the window." \
--output ramen.mp4
# First keyframe, or first + last keyframe (fl2va)
hyperflow-h3-flash --prompt "..." --image first.png --output clip.mp4
hyperflow-h3-flash --prompt "..." --image first.png --last-image last.png --output clip.mp4
# Reference images, videos (with soundtrack), and audio clips in prompt order (ref2va)
hyperflow-h3-flash --prompt "<Picture 1> walks through the scene of <Picture 2> ..." \
--reference person.png --reference scene.png --output clip.mp4
# 15 s clip, context-parallel across 4 GPUs (or --gpus auto for up to 4 visible GPUs)
hyperflow-h3-flash --prompt "..." --num-frames 360 --gpus 4
# 4 steps (speed), 6 steps (default), or 8 steps (quality)
hyperflow-h3-flash --prompt "..." --steps 4
```
| Option | Values / Default | Description |
| --- | --- | --- |
| `--steps` | `4`, `6` (default), `8` | Sampling steps: `4` for speed, `6` balanced, `8` for quality. Sigma grids are in [`schedule.py`](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/src/hyperflow_h3_flash/schedule.py). |
| `--num-frames` | `124`–`362` (default `124`) | Frame count at 24 fps (`5.2` to `15 s`). Rounds up to `17n + 5` (`360` becomes `362`). |
| `--height`, `--width` | Multiples of 32 | Default: 768 on the short edge. Follows the `--image` aspect ratio, or 16:9 for `t2va`. |
| `--reference` | Repeatable path | `ref2va` inputs matching `<Picture i>`, `<Video i>`, and `<Audio i>` in prompt order. Limits: 9 images, 3 videos, 3 audio clips, 12 total. |
| `--gpus` (`--num-gpus`) | `1`, `2`, `4`, `7`, `8`, `auto` | Multi-GPU context and VAE tile parallelism. Re-launches automatically under `torchrun`. |
| `--offload` | `auto` (default), `none`, `model`, `stream` | GPU memory placement. See [Offload Modes](https://github.com/Video-Rebirth/hyperflow-h3-flash#offload-modes-hyperflow-h3-flash). |
| `--text-encoder-precision` | `bf16` (default), `fp8` | `fp8` loads [`Qwen/Qwen3-VL-32B-Instruct-FP8`](https://huggingface.co/Qwen/Qwen3-VL-32B-Instruct-FP8). Saves ~22 GiB system RAM when offloading. Requires the `[fp8]` extra. |
| `--fp8-gemm` | `triton` (default), `deepgemm` | GEMM backend of the `fp8` text encoder. `deepgemm` needs Hopper or newer. |
| `--attention` | `auto` (default), `sdpa`, `fa3` | Uses FlashAttention-3 (`fa3`) on Hopper when `kernels` is installed. Uses PyTorch `sdpa` otherwise. |
| `--block-chunk` | `0` (default), `16384`, ... | Slices every token-wise op of a transformer block to bound VRAM activations. `16384` fits 15 s mixed `ref2va` in 24 GB VRAM. |
| `--weights`, `--subfolder`, `--base-model` | Hub ID or local path | Override the transformer repo, task subfolder, or base `MiniMaxAI/MiniMax-H3` snapshot. |
[`examples/benchmark.py`](https://github.com/Video-Rebirth/hyperflow-h3-flash/blob/main/examples/benchmark.py) times every pipeline stage and per-GPU peak memory under `torchrun`.
### Python API
```
import torch
from diffusers.utils.export_utils import encode_video
from hyperflow_h3_flash import load_pipeline
pipe = load_pipeline("t2va") # "fl2va": pass image=... (and last_image=...); "ref2va": pass references=[...]
out = pipe(
prompt="A chef slides a steaming bowl of ramen across a wooden counter.",
num_frames=124,
num_inference_steps=6, # 4, 6, or 8
generator=torch.Generator().manual_seed(0),
output=["videos", "audio", "sampling_rate"],
)
encode_video(
out["videos"][0],
fps=24,
output_path="ramen.mp4",
audio=out["audio"][0],
audio_sample_rate=out["sampling_rate"],
)
```
- **Multi-GPU under `torchrun`:** Call `torch.distributed.init_process_group("nccl")` and pass `device=f"cuda:{local_rank}"` to `load_pipeline`. The pipeline shards execution across ranks and returns the full output on every rank.
- **Standalone transformer (`AutoModel`):** Each INT8 Hub folder ships self-contained model code. Load it without installing this package:
`from diffusers import AutoModel`, then `AutoModel.from_pretrained("VideoRebirthAI/hyperflow-h3-flash", subfolder="fl2va_int8_convrot", trust_remote_code=True, torch_dtype=torch.bfloat16)`.
### Offload Modes
`--offload` sets GPU memory placement. `auto` (default) selects a mode from per-GPU VRAM:
| `--offload` | Kept in GPU VRAM | `auto` threshold (1 GPU / multi-GPU) | System RAM (`bf16` / `fp8` text encoder) |
| --- | --- | --- | --- |
| `none` | All components | ≥ 90 GiB / ≥ 65 GiB | ~16 GiB |
| `model` | One active component at a time | ≥ 60 GiB / ≥ 45 GiB | ~91 GiB / ~69 GiB |
| `stream` | Active VAE + one transformer block or text-encoder layer at a time | < 60 GiB / < 45 GiB | ~91 GiB / ~69 GiB |
- `stream` is only ~2% slower than `none` on the same GPU.
- `model` and `stream` keep offloaded weights in one pinned host-memory allocation.
- The loader drops unused Qwen3-VL layers above the conditioning tap. This saves ~14 GB. `--text-encoder-precision fp8` saves another ~22 GiB.
- In containers, read the memory limit from `/sys/fs/cgroup/memory.max`, not from `free`.
---
## Benchmarks
All runs are end-to-end at **1344×768 and 6 steps**: text encoding, transformer, and video and audio VAE decode. Each `a / b` cell is total time for a **5.2 s / 15 s** clip (124 / 362 frames).
### Consumer RTX GPUs: `t2va`
| GPU | GGUF, ≥ 64 GB RAM | GGUF, 32 GB RAM | GGUF, 16 GB RAM | INT8, ≥ 69 GiB RAM |
| --- | --- | --- | --- | --- |
| **RTX 5090 (32 GB)** | 99 s / 575 s | 118 s / 618 s | 130 s / 615 s | 92 s / 551 s |
| **RTX 4090 (24 GB)** | 157 s / 830 s | 151 s / 815 s | 153 s / 812 s | 130 s / 750 s |
| **RTX 3090 (24 GB)** | 315 s / 1835 s | 318 s / 1869