OpenVDN/vdn-minimax-h3

VideoDeltaNet-H3: Live T2VA / I2VA / FL2VA generation based on Minimax H3.

What is VDN-Minimax-H3?

VDN-H3 (Video DeltaNet on MiniMax H3) 是一款 hybrid-attention video diffusion model,建立在 MiniMax H3 backbone 之上。它增加了轻量级线性注意力分支与少量 LoRA 适配器,让模型能够在保持视觉质量接近原始密集模型的情况下,生成 14 秒、768p 的视频,速度比实时还要快


Key ideas

| Idea | Why it matters | |------|----------------|| | Hybrid architecture | 一个分支使用低成本线性注意力来提升速度;另一个分支则保留完整的 softmax attention 分支以维持质量与时序一致性。 | | Plug-and-play LoRA adapters | 额外的线性分支与两个微小的 LoRA 模块会在推理时合并,不会更动原始的 MiniMax 权重。 | | FP8 inference + FlashAttention-4 | 混合精度 (FP8) 与最新的 FlashAttention kernels 提供在现代 NVIDIA H200/B200 GPU 上高达 3x-5x 的加速。 | | Open-source stack | 同时发布了优化的推理代码与完整的训练配方,因此任何人都可以重现或微调模型。 |


Getting started (quick-start)

  1. Clone & create a conda env (Python 3.12, PyTorch 2.13+CUDA 12.9). 安装 uv 包管理器并运行 uv pip install -e . 以拉取所有依赖项,包括预发布版的 flash-attn-4
  2. Patch Diffusers – 一个辅助脚本 (scripts/setup_diffusers.sh) 会对 HuggingFace Diffusers 库进行必要的修改。
  3. Download the weights (≈ 82 GB) 使用 HuggingFace CLI:
    hf download OpenVDN/vdn-minimax-h3 --local-dir ckpts
    
    该目录将包含 MiniMax-H3 基础模型 (≈ 72 GB) 与两个 VDN-H3 检查点 (≈ 4-5 GB 各个)。
  4. Run a single-GPU test:
    bash scripts/inference/8nfe_tuned_fp8.sh
    
    该脚本会在首次运行时编译 Flash kernels,然后在一个 8-GPU B200 节点上约 11 秒内完成 8 步视频去噪,或在单个 B200 上约 6 秒。
  5. Render your own prompt – 使用 Qwen3-VL-32B VLM 对文本提示词进行编码,然后调用推理脚本:
    python src/inference/encode_prompt.py --prompt "..." --out prompts/mine.pt
    python src/inference/infer.py \
      --config configs/inference/8nfe_tuned_fp8.yaml \
      checkpoint=ckpts/stage-dmd-step-250 \
      render.prompt_file=prompts/mine.pt \
      render.out=results/mine.mp4
    
    (README 建议使用 MiniMax-H3-Context-IR 重新编写提示词以获得最佳质量。)

Performance numbers (steady-state denoising, 768p, 14.4s video)

GPU type #GPUs Seconds per NFE 50-step VDN-H3 (≈ 9 min) 8-step VDN-H3
H200 1 11.2 9.4 min 90.5s
H200 8 2.29 1.9 min 18.3s
B200 1 6.41 5.3 min 51s
B200 8 1.40 1.2 min 11.23s

(这些时长不包含模型加载、预热、VAE 解码与 MP4 编码。)


Training pipeline

VDN-H3 是在冻结的 MiniMax-H3 transformer 之上进行 four stages 训练的:

Stage What is trained Steps
A1 Linear-attention branch (layer-wise alignment) 200
A2 Same branch, end-to-end fine-tune 500
B LoRA adapters on QKV/O projections + linear branch 2000
DMD 8-step "turbo" LoRA (data-free, initialized from a community LoRA) 250

训练脚本位于 src/training/scripts/training/。数据必须是遵循 MiniMax-H3 格式的预编码 latents (视频, 音频, 文本);一个 video_index.jsonl 会指向每个 clip 的视频 latent file。


License & attribution

  • Code – Apache 2.0 (参见 LICENSE).
  • Model weights – 分别在 HuggingFace 上以 MiniMax H3 Community License 发布 (不属于 Apache 2.0 覆盖范围)。
  • 引用该工作时请使用提供的 BibTeX 条目。

TL;DR

VDN-Minimax-H3 是一款开源的混合注意力视频扩散模型,它 在 MiniMax H3 上增加了快速的线性注意力分支与微小的 LoRA 适配器,实现了一种接近实时的视频生成。该仓库提供了在单个 GPU 或 8-GPU 集群上运行推理的所需一切,并包含用于重现模型的完整训练配方。

相关

  • 项目
  • 项目
  • 项目
  • 项目