Spark-H3
Adaptive Block Sparse Attention for MiniMax-H3
Nodes (9)
Loading a Cached MiniMax-H3 Latent
MiniMax H3 BSA All-Exact (Scheduled Dense Control)
MiniMax-H3 DMAD Sampler
MiniMax H3 Sol Attention (Official Compatibility)
Spark Attention (SM120)
Spark Attention (SM86)
Spark Attention (SM89) on 4090s and 4080s
MiniMax-H3 AV Latent Saver
Save Video Lossless (Ultrafast)
[!WARNING] Compatibility and release schedule notice (October 25, 2026)
We have recently received community reports indicating that newer
comfy-kitchenimplementations may cause performance regressions with certain hardware configurations or workflows. The issue is still under investigation, and its impact may vary by environment.Until the cause is confirmed and resolved, we recommend installing or continuing to use the validated and currently more stable ComfyUI 0.38.x release, and exercising caution when upgrading. See this community report and comparison video for additional context.
Consequently, the new release originally planned for October 27, 2026 has been postponed. We will prioritize investigating the
comfy-kitchenissue and resume the release after compatibility and performance have been verified. Further updates will be posted in this repository. Thank you for your understanding and feedback.
ComfyUI v0.1.5: Adds support for ComfyUI 0.42.x (comfy-kitchen 0.2.39), with Linux and Windows packages for SM86, SM89, and SM120. Each package also includes wheels for ComfyUI 0.38.x–0.40.x. Release notes and downloads
VPack v0.1.0: A separate ComfyUI plugin that compresses reference videos in Ref2VA workflows. VPack GitHub repository
Source development: Spark chunked paths and build instructions. The node defaults to
chunk_path=none; selectdrop_kto enable chunking.keep_kremains an internal experimental path.
<a id="demo"></a>
🎬 Demo
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.
<p align="center"><a href="https://huggingface.co/Aazeus/Spark-H3/resolve/main/comfyui/demos/H3_native_vdn_selected_0006_dense_fidelity_speed_native_resolution.mp4">Watch the full 14.4-second comparison</a></p>- Veda / Sol / Spark: subjective visual quality and speed comparison (Bilibili)
- Spark-H3 + VPack on Ref2VA (Bilibili)
✨ Spark-Attn
Spark-Attn is a block sparse attention method for MiniMax-H3 video generation. It combines two operations:
- 🧩 Reblocking groups similar tokens into blocks so sparse attention can select more relevant interactions.
- ⚖️ Reweighting assigns different weights to tokens within each tail block when building key/value summaries, with a correction for attention mass.
Spark-H3 provides the Spark attention kernels and MiniMax-H3 inference integration.
<a id="quick-start"></a>
🚀 Quick Start
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)
<a id="comfyui-installation"></a>
🧩 ComfyUI Installation
Spark-H3 provides standalone nodes for ComfyUI 0.38.x–0.40.x and 0.42.x. v0.1.5 adds ComfyUI 0.42.x support with Linux and Windows x86_64 packages for SM86, SM89, and SM120. Each package also supports ComfyUI 0.38.x–0.40.x. Choose the CUDA 13.0 package matching your operating system and GPU architecture. ComfyUI and model weights are not included.
For installation and example workflows, see the ComfyUI guide or 中文安装指南.
For reference-video compression in Ref2VA workflows, install the separate VPack v0.1.0 plugin.
Step-count convention
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.
<a id="todo"></a> <a id="project-status"></a>
🧭 Project Status & Roadmap
The Diffusers and ComfyUI integrations are separate implementation tracks. Their status is listed independently below so that backend work is not confused with ComfyUI packaging or compatibility work.
Diffusers / Python
| Status | Item | Resources | |---|---|---| | ✅ Available | Spark attention integration for MiniMax-H3, with fused kernels for SM80, SM86, SM89, and SM120 | Usage and kernel documentation · Performance matrix | | ✅ Available | Ref2VA pipeline support and released inference examples | Spark-Ref2VA Preview | | 🗓️ Planned | Fused Spark kernels for SM90 and SM100 | Pending hardware resources | | 🗓️ Planned | Technical report release | — |
ComfyUI
| Version | Date | Status | Main improvements / expected updates | Release / tracking |
|---|---|---|---|---|
| v0.1.1 | 2026-10-09 | ✅ Released | First stable Linux packages for SM89 and SM120; fixed the v0.1.0 CUDA Graph allocation-lifetime issue; bundled five representative workflows | Release notes |
| v0.1.2 | 2026-10-11 | ✅ Released | Added validated Windows SM89 and SM120 packages; corrected packaged workflows and optimized the LBH two-pass example | Release notes |
| v0.1.3 | 2026-10-13 | ✅ Released | Added validated SM86 packages; integrated with KJNodes low-VRAM patches; added fidelity, speed, custom, and dense presets plus selectable dense backends | Release notes |
| v0.1.4 | 2026-10-15 | ✅ Released | Added ComfyUI 0.40.x support, Ref2VA-aware sparse_scope, configurable producer_chunk, and in-node Ref2VA guidance | Release notes |
| v0.1.5 | 2026-10-19 | ✅ Released | Added ComfyUI 0.42.x support through comfy-kitchen 0.2.39; released Linux and Windows SM86/SM89/SM120 packages, each also bundling wheels for ComfyUI 0.38.x–0.40.x | Release notes |
| v0.1.6 | TBD | 🛠️ Planned | Add Spark-H3 compatibility with SelfLift-Avatar, including integration and workflow validation; add support for ComfyUI 0.37.x and Python 3.11.x | SelfLift-Avatar repository |
The current v0.1.5 release supports ComfyUI 0.38.x–0.40.x and 0.42.x with Linux and Windows x86_64 packages for SM86, SM89, and SM120. See the ComfyUI guide for workflows and the installation guide for package details. Reference-video compression is provided separately by VPack.
🤝 Acknowledgments
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.
<a id="special-thanks"></a>
❤️ Special Thanks
- Thanks to Smthem (GitHub · Bilibili) for support and help during the development of Spark-H3's ComfyUI plugin.
- Thanks to AI绘画KK (GitHub · Bilibili) for valuable guidance and support in exploring and applying MiniMax-H3 workflows, and for helping communicate the community's need for Windows installation packages.
- Thanks to AIwood爱屋研究室 (GitHub · Bilibili) for identifying a bug when Spark-H3 was used in a two-pass sampling workflow and suggesting a switch to Kitchen as the dense backend, which further improved the plugin's speedup ratio.
⭐ Star History
<p align="center"> <a href="https://www.star-history.com/?repos=zechengtang%2FSpark-H3&type=date&legend=top-left"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=zechengtang/Spark-H3&type=date&theme=dark&legend=top-left"> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=zechengtang/Spark-H3&type=date&legend=top-left"> <img alt="Spark-H3 GitHub star history chart" src="https://api.star-history.com/chart?repos=zechengtang/Spark-H3&type=date&legend=top-left" width="720"> </picture> </a> </p>📄 License
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.
