ComfyUI Extension
ComfyUI-MiniMaxH3-AttentionMask
ComfyUI custom node for applying Spatial and Temporal Attention Masking to MiniMax-H3 models.
khwhite0413/ComfyUI-MiniMaxH3-AttentionMask
Nodes1
On cloudLocal install
CategoryMiniMax-H3/Attention
Stars2
Updated20 days ago
Readme
ComfyUI-MiniMaxH3-AttentionMask
A ComfyUI custom node for applying Spatial and Temporal Attention Masking to MiniMax-H3 Diffusion Transformer (DiT) models.
Features
- Region-Specific Control: Apply SAM2 / RMBG / Custom masks directly to MiniMax-H3's Self-Attention (
attn1) layers. - Background Suppression / Foreground Preservation: Isolate background textures or maintain character motion while seamlessly replacing backgrounds.
- Attention Strength Slider: Fine-tune influence from
0.0to1.0(Recommended:0.75-0.85for smooth camera motion & background replacement). - Full Model Compatibility: Works with FP16, FP8, INT8 (
int8_convrot), NVFP4, AWQ quantized MiniMax-H3 models and native Video/Audio VAEs.
Installation
Navigate to your ComfyUI custom_nodes directory and clone this repository:
cd ComfyUI/custom_nodes
git clone https://github.com/YourUsername/ComfyUI-MiniMaxH3-AttentionMask.git
Restart ComfyUI after cloning.
How to Use in ComfyUI
- Add Node: Right-click canvas -> MiniMax-H3/Attention -> MiniMax-H3 Attention Mask Patcher.
- Connect Inputs:
model: Connect from your MiniMax-H3 Model Loader (MODELoutput).mask: Connect a SAM2 / RMBG / Load Mask output (MASK). (Foreground Person = 1.0, Background = 0.0).strength: Set between0.75and0.85for optimal camera motion & replacement.mode: Choosesuppress_backgroundorpreserve_foreground.
- Connect Output:
- Connect the patched
MODELoutput into your KSampler / SamplerCustomAdvanced node.
- Connect the patched
License
MIT License. Free for open community use.