Nodes/ComfyUI-MiniMax-H3-LongMedia/MiniMax H3 • Low-VRAM MLP Chunking (internal)
ComfyUI Node

MiniMax H3 • Low-VRAM MLP Chunking (internal)

The other half of H3's low-VRAM story (the MLP half)

By vizart-vj·Created 14 days ago·Updated 2 days ago· 71
MiniMax H3 • Low-VRAM MLP Chunking (internal)
  • guider
  • guider
  • mlp_chunk_state
chunk_tokens8192
max_blocks128
sol_modeexisting
sol_tau_start1.30
sol_tau_end0.80
sol_curvelinear
sol_min_tokens4096
sol_dense_percent0.00
sol_sink_conditioningexact_kv
sol_qkv_chunk_tokens8192
sol_out_proj_chunk_tokens24576
vram_activation_reserve_mb4096
inter_block_vram_guard_mb2048
inter_block_guard_cooldown_blocks4
inter_block_guard_emergency_mb512
inter_block_guard_emergency_cooldown_blocks3
late_block_guard_start40
late_block_guard_target_mb6144
late_block_guard_min_cached_mb512
step_boundary_cleanup_mb2048
sol_sigma_hi1.0000
sol_sigma_lo0.0000

Everyone talks about attention when a big video model OOMs, but the feed-forward MLP layers are just as hungry - they blow up the token count into an even wider intermediate space. This node is the low-VRAM MLP half of the pack's memory strategy: it wraps your guider so H3's transformer MLPs run in token chunks instead of all at once. It's marked "(internal)", it's hidden from the normal node menu, and you almost certainly don't need to touch it - but if you're hand-building a low-VRAM sampler graph, this is the knob.

What it does

Feed it a guider and it returns a wrapped guider with token-chunked MLP execution installed, plus an mlp_chunk_state output carrying diagnostics. The inputs are the memory tune-up kit:

  • chunk_tokens (default 8192) - the MLP chunk size. 8192 is the pack's "safe default"; smaller (4096/2048/1024/512) buys VRAM at a speed cost, larger is faster but hungrier. 0 effectively disables chunking for A/B tests.
  • max_blocks (default 128) - how many transformer blocks the chunking applies to.
  • sol_mode (auto/existing/sol/scheduled_sol) plus the whole sol_* family - this mirrors the Sampler's attention controls, because MLP chunking and the Sol attention path are two halves of the same bounded-memory strategy. The pack keeps stock/fallback math when parity checks fail, so you're not locked into an approximation path by default.

The rest - vram_activation_reserve_mb, the inter_block_vram_guard_* group, late_block_guard_*, step_boundary_cleanup_mb, sol_sigma_hi/sol_sigma_lo - are the same VRAM-governor settings the Sampler exposes. Leave them at defaults unless a console message points at them.

Why it exists

The Long Media Sampler already does all of this automatically via its mlp_chunk_tokens input. This node exists for people building the sampling graph by hand (the "manual" workflow mode, or diagnostics), where you need the same chunked MLP behavior without pulling in the whole Sampler. The README's frame is explicit: resident INT8 MLP execution and adaptive VRAM policy that preserves stock math when it can - a "bounded but faithful" approach rather than a lossy shortcut.

Install

Part of ComfyUI-MiniMax-H3-LongMedia. Manager search "MiniMax-H3-LongMedia", or:

cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia

restart, plus the H3 checkpoint and VAEs (MiniMaxAI/MiniMax-H3, ~42.5 GB, community license excludes US/EU/UK/Korea).

Troubleshooting

If you wire this in and memory doesn't move, the usual suspect is that a LoRA or memory pack already patched the MLP path - the node cooperates rather than tramples, so check the console for a "patch already present" style message. If output quality shifts when chunking is active, that's the fallback math doing its job: the pack only keeps chunked paths where numerical parity holds, and a visible quality change usually means you're on a path that failed a parity check. And remember the production advice applies here too - keep Dynamic VRAM on and don't launch with --disable-dynamic-vram, since the whole low-VRAM story coordinates with ComfyUI's dynamic residency.

CategoryMiniMax H3/LongMedia/LongMedia

Inputs (23)

NameTypeDefaultDescription
guiderGUIDER
chunk_tokensINT8192256–131072
max_blocksINT1281–256
sol_modeCOMBOexisting4 options: auto, existing, sol, scheduled_sol
sol_tau_startFLOAT1.300–4
sol_tau_endFLOAT0.800–4
sol_curveCOMBOlinear6 options: linear, cosine, sqrt, smoothstep, exponential, step
sol_min_tokensINT4096256–131072
sol_dense_percentFLOAT0.000–0.9
sol_sink_conditioningCOMBOexact_kv3 options: exact_kv, exact_kv_and_rows, off
sol_qkv_chunk_tokensINT81920–131072
sol_out_proj_chunk_tokensINT245760–131072
vram_activation_reserve_mbINT40960–12288
inter_block_vram_guard_mbINT20480–8192
inter_block_guard_cooldown_blocksINT40–32
inter_block_guard_emergency_mbINT5120–4096
inter_block_guard_emergency_cooldown_blocksINT30–32
late_block_guard_startINT400–127
late_block_guard_target_mbINT61440–12288
late_block_guard_min_cached_mbINT5120–4096
step_boundary_cleanup_mbINT20480–8192
sol_sigma_hiFLOAT1.0000-1000–1000
sol_sigma_loFLOAT0.0000-1000–1000

Outputs (2)

NameTypeDescription
guiderGUIDER
mlp_chunk_stateH3_BLOCK_MEMORY_TRACE_STATE