Nodes/comfyui-minimax-h3-audio-T8/MiniMax H3 SLA Precision V2 Attention (Advanced EXP)
ComfyUI Node

MiniMax H3 SLA Precision V2 Attention (Advanced EXP)

The precision-first H3 attention patch

By T8mars·Created about a month ago·Updated a day ago· 1,031
MiniMax H3 SLA Precision V2 Attention (Advanced EXP)
  • model
  • sigmas
  • model
  • runtime
  • report_json
schedule_policyrecommended_8nfe_12v_3a
sparsity_ratio0.90
block_size32
min_seq_len8192
dense_last_steps1
protect_audiotrue
dense_steps0
dense_backendcomfy_kitchen
disable_fp16_accumtrue
stabilize_motionfalse
reference_protectionfalse

SLA - sparse linear attention - is the idea that a MiniMax H3 forward pass doesn't need to compute every attention block at full precision. A learned router picks the blocks worth keeping, and the rest run through a sparse kernel that skips most of the work. That's the theory, and the T8 pack's first SLA implementation was exactly that theory with a bug list: pooled BF16 routing, quantized Q/K (the spas-sage-attn Sage2 path), 128×64 tiles, step counting by model invocation instead of real sigma steps, coarse prefix protection, and an all-sparse schedule that didn't protect the moments that mattered. The result: quality collapses the author eventually traced and rebuilt around.

The rebuild

This node is the rebuild. SLA Precision V2 Attention pins the PlagueKind/ComfyUI-PlagueKind-Nodes sparse-attention implementation (v1.4.3, commit 066ada9, MIT) and re-engineers the routing around precision:

  • FP32 routing and scores - the router that decides which blocks stay is no longer running in half precision.
  • Direct Triton sparse kernel with FP32 online softmax - no quantized Q/K path, no Sage2 approximation layer in the hot loop.
  • Logical sigma-based steps - the patch knows which noise-level step it's on from the sigmas you feed in, instead of counting model calls, so "first step, last step, middle steps" is an actual schedule.
  • Dense first and last steps with exact language/audio segment protection - the blocks covering your text and audio conditioning are pinned and never starved.
  • Defaults matching the validated recipe: 90% requested sparsity, 32×32 blocks, minimum sequence 8192.

Placement and the wires that matter

Placement matters and the node enforces it by contract: the input model must already carry the SLA LoRA, which is why it's chained after the SLA Dynamic LoRA Bypass V2 in the recommended graph (Dual-Clock → bypass → Precision V2 → BasicGuider). The other required wire is sigmas - connect the dual-clock sigmas your sampler is using; the node reads the actual schedule to derive logical steps, so a user_selected_nfe_exp policy only makes sense when you know exactly what NFE you're feeding it. The default schedule_policy is recommended_8nfe_12v_3a, which expects eight NFE with video/audio shifts 12/3 - the configuration of the fix workflow (736×416×124, 8 NFE).

The remaining inputs are mostly already-right defaults, but the ones worth knowing if you experiment: dense_steps (string, default "0" - which steps run dense), dense_backend (default comfy_kitchen, with pytorch and several sage variants available - this is the backend used for the dense boundary steps), dense_last_steps (1), protect_audio (true), disable_fp16_accum (true - part of the precision story), and two experimental flags, stabilize_motion and reference_protection, both off by default.

Outputs

Outputs: the patched model, a runtime object (custom type - hold onto it; the Audit node downstream requires this exact object), and report_json.

What this node does not do: it is not a universal speed toggle, and it does not work on a model without an SLA LoRA loaded. The author's evidence is one environment (RTX 4060 Ti 16 GB, sm89): ~12% faster end-to-end than a same-seed dense XFormers control, byte-identical decode before/after adding per-step observability, and a user blind pass that judged the pair roughly equal (non-inferior). It's genuinely promising and genuinely Advanced EXP - the 16 GB memory gate (512 MiB free) was not met. Run it with the Audit node wired, or you're flying without instruments.

Installing it

Install: ComfyUI Manager search MiniMax H3 Audio T8, or git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8.git into custom_nodes, restart after updating ComfyUI core. Base: FL2VA (FP8 scaled), LoRA in models/loras, workflow in 15-sla-attention. Don't stack it with other attention/sampler-owning patches - this pack's standing rule.

CategoryT8/MiniMax H3/Performance/Experimental

Inputs (13)

NameTypeDefaultDescription
modelMODEL
sigmasSIGMAS
schedule_policyCOMBOrecommended_8nfe_12v_3a2 options: recommended_8nfe_12v_3a, user_selected_nfe_exp
sparsity_ratioFLOAT0.900.6–0.95
block_sizeCOMBO323 options: 32, 64, 128
min_seq_lenINT81920–1000000
dense_last_stepsINT10–8
protect_audioBOOLEANtrue
dense_stepsoptSTRING0
dense_backendoptCOMBOcomfy_kitchen8 options: pytorch, comfy_kitchen, sage:auto, sage:qk_int8_pv_fp16_cuda, sage:qk_int8_pv_fp16_triton, sage:qk_int8_pv_fp8_cuda, +2
disable_fp16_accumoptBOOLEANtrue
stabilize_motionoptBOOLEANfalse
reference_protectionoptBOOLEANfalse

Outputs (3)

NameTypeDescription
modelMODEL
runtimeMINIMAX_H3_SLA_PRECISION_V2_RUNTIME
report_jsonSTRING