Nanjing University's Spark-H3 Makes MiniMax-H3 Video 3x Faster Without Retraining
A training-free sparse attention trick cuts MiniMax-H3 video generation time by more than half while keeping outputs nearly identical to dense attention.
Takeaways
- Spark-H3 is a training-free block sparse attention backend for the MiniMax-H3 video diffusion model.
- At 10% exact-block density it reports 2.49x DiT speedup and 24.81 dB PSNR versus dense outputs.
- At 20% density PSNR rises to 26.76 dB with a 2.26x DiT speedup on 345-frame 1344x768 video.
- Spark-Reblock recursively groups tokens by attention preference while keeping uniform block shapes for GPU kernels.
- Spark-Reweight uses the global mean query to calibrate compressed-block key, value, and logit bias.
- Code ships with fused kernels for SM80, SM86, SM89, SM120 and ComfyUI nodes.
Generating a 14-second, 345-frame video at 1344x768 with a diffusion transformer requires attention across hundreds of thousands of latent video tokens. Dense attention compares queries with large sets of keys, making the calculation increasingly expensive as token counts rise. Researchers from Nanjing University and partner institutions have introduced Spark-H3, a training-free sparse attention backend that preserves MiniMax-H3’s weights while accelerating its diffusion transformer.
Spark-H3 implements the authors’ broader Spark-Attn method for MiniMax-H3. The GitHub repository provides the integration and fused GPU kernels. Developers can apply the backend at inference time without retraining or fine-tuning the base model.
Speed depends on density
The paper evaluates 20 denoising steps at 345 frames and 1344x768 resolution. Exact-block density specifies the share of attention blocks calculated in full; the remaining blocks still contribute through compressed summaries.
| Exact-block density | DiT speedup | PSNR versus dense output |
|---|---|---|
| 10% | 2.49x | 24.81 dB |
| 20% | 2.26x | 26.76 dB |
At 10% density, the 2.49x result reduces measured diffusion-transformer runtime to about 40% of the dense baseline. Raising density to 20% spends more computation on exact attention and produces an output closer to the dense result. End-to-end gains depend on the surrounding stack because text encoding, VAE decoding, data movement, and orchestration fall outside the DiT measurement.
Peak signal-to-noise ratio, or PSNR, measures pixel-level similarity between sparse and dense outputs in decibels. Higher values indicate closer reproduction, but the metric does not evaluate prompt adherence or overall visual quality. Temporal coherence and fine-detail consistency require separate inspection.