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 格式的預編碼潛在變量 (影片、音訊、文本);一個 video_index.jsonl 會指向每個片段的影片潛在變量文件。


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 集群上運行推理的所需一切,並包含用於重現模型模型的完整訓練配方。

相關

  • 專案
  • 專案
  • 專案
  • 專案