Adaptive Block Sparse Attention for MiniMax-H3
See the code
Reblock similar tokens · Reweight tail tokens
English · 简体中文
🎬 Demo · 🚀 Quick Start · 🧩 ComfyUI · 📖 Technical Blog · 🧭 Project Status
ComfyUI v0.1.4: Adds ComfyUI 0.40.x support and
sparse_scope=joint-videofor video-conditioned Ref2VA. Release notes and downloads
Spark-VPack v0.1.0: A separate ComfyUI plugin that compresses reference videos in native Ref2VA workflows. Release notes and download
Spark-Attn is a block sparse attention method for MiniMax-H3 video generation. It combines two operations:
Spark-H3 provides the Spark attention kernels and MiniMax-H3 inference integration.
Native MiniMax-H3 · VDN Selected Prompt 06 · 1344×768 · 14.4 seconds. The three panels compare Dense, Spark-H3 Fidelity (2.19×), and Spark-H3 Speed (3.12×). The animated preview and linked clip cover the final 5.4 seconds, starting at 9 seconds.
Watch the full 14.4-second comparison
Set up your H3 pipeline using the upstream MiniMax-H3 instructions, then install Spark in the same environment with a compatible PyTorch/CUDA stack:
python -m pip install -e '.[cuda]'
Wrap an already loaded pipeline with the Spark installer:
from h3_sparse_attention import install_h3_spark_attn
# MiniMaxH3Scheduler includes the terminal sigma=0 in num_inference_steps,
# but that terminal point does not run the transformer.
num_denoise_steps = 19
num_inference_steps = num_denoise_steps + 1
with install_h3_spark_attn(
pipe.transformer,
num_denoise_steps=num_denoise_steps,
warmup_mode="warmup_steps",
warmup_steps=4,
dense_layers=0,
topk_ratio=0.1,
):
result = pipe(**inputs, num_inference_steps=num_inference_steps)
Spark-H3 provides standalone nodes for ComfyUI 0.38.x, 0.39.x, and 0.40.x on Linux and Windows x86_64. Release packages support GeForce RTX 30-series GPUs (SM86), GeForce RTX 40-series GPUs (SM89), GeForce RTX 50-series and RTX PRO 5000/6000 Blackwell GPUs (SM120). Choose the CUDA 13.0 package matching your operating system and GPU architecture. ComfyUI and model weights are not included.
Download v0.1.4, or see the ComfyUI guide or 中文安装指南 for downloads, installation, and example workflows.
For reference-video compression in native Ref2VA workflows, install the separate Spark-VPack v0.1.0 plugin.
MiniMaxH3Scheduler includes the final σ=0 endpoint in
num_inference_steps, so the default num_inference_steps=50 runs 49 denoising steps. See the
Hugging Face scheduler documentation.
| Status | Item | Resources |
|---|---|---|
| ✅ Available | Fused Spark kernels for SM80, SM86, SM89, and SM120 | Kernel documentation · Performance matrix |
| ✅ Available | Standalone ComfyUI node packaging with wheel-first installation and source fallback | ComfyUI guide |
| ✅ Available | Release Ref2VA inference examples | Spark-Ref2VA Preview |
| 🚧 In progress | Test and validate the ComfyUI implementation on SM120 GPUs, including GeForce RTX 50 series and RTX PRO 5000/6000 Blackwell | — |
| 🗓️ Planned | Standalone stable ComfyUI implementation without a comfy-kitchen dependency | — |
| 🗓️ Planned | Fused Spark kernels for SM90 and SM100 | Pending resources |
| 🗓️ Planned | Release the technical report | — |
Thanks to MiniMax-H3 and Sol-Attn / Sol-Engine for the model and attention infrastructure. See the third-party notices for kernel attributions and included licenses.
Spark-Attn’s original code and documentation are licensed under the Apache License 2.0. Third-party components retain their original licenses and notices; see third-party notices. MiniMax-H3 model weights remain subject to their upstream license.
Adaptive Block Sparse Attention for MiniMax-H3
See the code
Reblock similar tokens · Reweight tail tokens
English · 简体中文
🎬 Demo · 🚀 Quick Start · 🧩 ComfyUI · 📖 Technical Blog · 🧭 Project Status
ComfyUI v0.1.4: Adds ComfyUI 0.40.x support and
sparse_scope=joint-videofor video-conditioned Ref2VA. Release notes and downloads
Spark-VPack v0.1.0: A separate ComfyUI plugin that compresses reference videos in native Ref2VA workflows. Release notes and download
Spark-Attn is a block sparse attention method for MiniMax-H3 video generation. It combines two operations:
Spark-H3 provides the Spark attention kernels and MiniMax-H3 inference integration.
Native MiniMax-H3 · VDN Selected Prompt 06 · 1344×768 · 14.4 seconds. The three panels compare Dense, Spark-H3 Fidelity (2.19×), and Spark-H3 Speed (3.12×). The animated preview and linked clip cover the final 5.4 seconds, starting at 9 seconds.
Watch the full 14.4-second comparison
Set up your H3 pipeline using the upstream MiniMax-H3 instructions, then install Spark in the same environment with a compatible PyTorch/CUDA stack:
python -m pip install -e '.[cuda]'
Wrap an already loaded pipeline with the Spark installer:
from h3_sparse_attention import install_h3_spark_attn
# MiniMaxH3Scheduler includes the terminal sigma=0 in num_inference_steps,
# but that terminal point does not run the transformer.
num_denoise_steps = 19
num_inference_steps = num_denoise_steps + 1
with install_h3_spark_attn(
pipe.transformer,
num_denoise_steps=num_denoise_steps,
warmup_mode="warmup_steps",
warmup_steps=4,
dense_layers=0,
topk_ratio=0.1,
):
result = pipe(**inputs, num_inference_steps=num_inference_steps)
Spark-H3 provides standalone nodes for ComfyUI 0.38.x, 0.39.x, and 0.40.x on Linux and Windows x86_64. Release packages support GeForce RTX 30-series GPUs (SM86), GeForce RTX 40-series GPUs (SM89), GeForce RTX 50-series and RTX PRO 5000/6000 Blackwell GPUs (SM120). Choose the CUDA 13.0 package matching your operating system and GPU architecture. ComfyUI and model weights are not included.
Download v0.1.4, or see the ComfyUI guide or 中文安装指南 for downloads, installation, and example workflows.
For reference-video compression in native Ref2VA workflows, install the separate Spark-VPack v0.1.0 plugin.
MiniMaxH3Scheduler includes the final σ=0 endpoint in
num_inference_steps, so the default num_inference_steps=50 runs 49 denoising steps. See the
Hugging Face scheduler documentation.
| Status | Item | Resources |
|---|---|---|
| ✅ Available | Fused Spark kernels for SM80, SM86, SM89, and SM120 | Kernel documentation · Performance matrix |
| ✅ Available | Standalone ComfyUI node packaging with wheel-first installation and source fallback | ComfyUI guide |
| ✅ Available | Release Ref2VA inference examples | Spark-Ref2VA Preview |
| 🚧 In progress | Test and validate the ComfyUI implementation on SM120 GPUs, including GeForce RTX 50 series and RTX PRO 5000/6000 Blackwell | — |
| 🗓️ Planned | Standalone stable ComfyUI implementation without a comfy-kitchen dependency | — |
| 🗓️ Planned | Fused Spark kernels for SM90 and SM100 | Pending resources |
| 🗓️ Planned | Release the technical report | — |
Thanks to MiniMax-H3 and Sol-Attn / Sol-Engine for the model and attention infrastructure. See the third-party notices for kernel attributions and included licenses.
Spark-Attn’s original code and documentation are licensed under the Apache License 2.0. Third-party components retain their original licenses and notices; see third-party notices. MiniMax-H3 model weights remain subject to their upstream license.