Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > H3-Optimizations > H3 Sparse Attention (Advanced)

ComfyUI Node: H3 Sparse Attention (Advanced)

Class Name

H3SparseAttentionAdvanced

Category
H3-Optimizations/Model Patches
Author
Zironic (Account age: 5217days)
Extension
H3-Optimizations
Latest Updated
2026-08-27
Github Stars
0.06K

How to Install H3-Optimizations

Install this extension via the ComfyUI Manager by searching for H3-Optimizations
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter H3-Optimizations in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

H3 Sparse Attention (Advanced) Description

Advanced node for fixed-density sparse attention in MiniMax H3 framework, optimizing video processing by managing attention budget.

H3 Sparse Attention (Advanced):

H3SparseAttentionAdvanced is an advanced node designed for implementing fixed-density sparse attention within the MiniMax H3 framework. This node is particularly beneficial for optimizing video processing tasks by managing the attention budget across different stages of the video generation process. By adjusting the video attention budget, you can control the computational resources allocated to different parts of the video, which can lead to faster processing times. However, it's important to note that lower attention budgets might affect the adherence to prompts, alter motion or detail, and change the overall generated result. The node provides flexibility by allowing you to specify early and late key-value (KV) overrides, which can fine-tune the attention distribution at the beginning and end of the processing steps. The default backend is Kitchen INT8, but you can choose from other options like FROST BF16, Sparse Sage, BF16 Triton, and FP8 FlexAttention, depending on your specific needs and hardware capabilities.

H3 Sparse Attention (Advanced) Input Parameters:

model

This parameter specifies the model to be used for processing. It is essential as it defines the architecture and capabilities of the attention mechanism. The model parameter does not have a default value and must be provided to ensure the node functions correctly.

video_budget

The video_budget parameter controls the amount of attention allocated to video processing. It is a crucial setting that impacts the speed and quality of the output. Lower values result in faster processing but may compromise quality. The default value is not explicitly stated, but it is adjustable based on your performance and quality requirements.

early_steps

This parameter determines the number of early steps in the attention schedule. It allows you to allocate more attention at the beginning of the processing, which can be beneficial for capturing initial details. The default value is 2, providing a balanced start to the attention distribution.

early_kv

The early_kv parameter sets the key-value ratio for the early steps. It influences how much information is retained or discarded in the initial stages. The default value is 0.5, offering a moderate level of detail preservation.

late_steps

Similar to early_steps, this parameter controls the number of late steps in the attention schedule. It helps in focusing attention towards the end of the processing, which can enhance the final details. The default value is 2, ensuring a consistent end to the attention distribution.

late_kv

The late_kv parameter defines the key-value ratio for the late steps. It affects the retention of information towards the end of the processing. The default value is 0.5, maintaining a balanced approach to detail retention.

backend

This parameter allows you to select the backend for processing. The default option is Kitchen INT8, which is optimized for performance. Other available options include FROST BF16, Sparse Sage, BF16 Triton, and FP8 FlexAttention, each offering different performance characteristics and compatibility with various hardware setups.

H3 Sparse Attention (Advanced) Output Parameters:

output

The output parameter represents the processed video or data after applying the sparse attention mechanism. It reflects the adjustments made based on the input parameters, such as video_budget and backend selection. The output is crucial for evaluating the effectiveness of the attention distribution and the overall quality of the generated content.

H3 Sparse Attention (Advanced) Usage Tips:

  • Experiment with different video_budget values to find the optimal balance between processing speed and output quality for your specific project.
  • Utilize the early_steps and late_steps parameters to fine-tune the attention distribution, especially if your video content has varying levels of detail throughout.
  • Consider the backend options based on your hardware capabilities to maximize performance. Kitchen INT8 is a good starting point, but other options might offer better results depending on your setup.

H3 Sparse Attention (Advanced) Common Errors and Solutions:

SparseSageError: Sparse Sage kernel failed

  • Explanation: This error occurs when the Sparse Sage kernel encounters an issue during processing, possibly due to incompatible settings or hardware limitations.
  • Solution: Verify that your hardware supports the selected backend and that all input parameters are correctly configured. Consider switching to a different backend if the problem persists.

Invalid video_budget value

  • Explanation: This error indicates that the video_budget parameter is set to a value outside the acceptable range.
  • Solution: Ensure that the video_budget is set within a reasonable range that aligns with your processing goals. Adjust the value to balance speed and quality effectively.

H3 Sparse Attention (Advanced) Related Nodes

Go back to the extension to check out more related nodes.
H3-Optimizations
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

H3 Sparse Attention (Advanced)