Nodes/comfyui-svdint4/Patch MiniMax H3 Block Cache (Experimental)
ComfyUI Node

Patch MiniMax H3 Block Cache (Experimental)

The denoising shortcut that's actually careful

By wjie98·Created 2 months ago·Updated about 10 hours ago· 2
Patch MiniMax H3 Block Cache (Experimental)
  • model
  • MODEL
profileauto
cache_deviceauto

Video sampling is expensive because every denoising step runs the whole transformer, every time. But here's a dirty secret: on a stable trajectory, most transformer blocks converge early, and later steps barely change them. Patch MiniMax H3 Block Cache exploits exactly that - it caches the output of transformer blocks that have stopped moving and reuses the saved result instead of recomputing it, step after step.

What makes this one interesting is how conservative it is. Block caching isn't new, but the sloppy implementations cache too aggressively and you can hear the quality collapse in the video. This patch only skips blocks it's confident are stable, and it's smart about the two situations where people actually use aggressive step counts.

How it works

The mechanism is a trajectory cache: it identifies transformer-block spans whose output is stable and reuses "one exact trajectory residual" for the skipped span, rather than interpolating or approximating from scratch. The profile dropdown is where the care shows:

  • auto (default) - selects a conservative preset, and only when your sampler matches an exact 4-step or 8-step trajectory. Anything else falls back to standard.
  • standard - the safe, general-purpose profile.
  • 4-step LoRA / 8-step LoRA - dedicated profiles tuned for the exact-step schedules the speed-LoRA crowd actually runs. These only kick in when your trajectory genuinely matches.

So the node refuses to guess. If your schedule isn't the exact 4- or 8-step pattern the profiles were tuned for, you get the conservative path - which is the honest behavior. It also prefetches only the blocks that will actually execute, and follows ComfyUI's Dynamic VRAM and pinned-memory lifecycle so the cache doesn't fight the engine for memory.

The inputs that matter

  • model - your H3 MODEL, in and out.
  • profile - auto (default), standard, 4-step LoRA, 8-step LoRA.
  • cache_device - auto (default), gpu, or cpu. Auto respects ComfyUI's free-VRAM reserve and keeps skipped blocks out of the Dynamic VRAM prefetch queue; CPU uses ComfyUI-managed pinned memory when available. If your card is tight, cpu is the honest answer.

Output: MODEL, into the sampler.

How to install

cd ComfyUI/custom_nodes
git clone https://github.com/wjie98/comfyui-svdint4
cd comfyui-svdint4
python -m pip install -v --no-build-isolation -e ./kernel

Here's the one genuinely nice install fact about this node: it's a Python-only patch. The README says so explicitly - no CUDA rebuild required when you update it, unlike the attention and VAE nodes in the same pack. Still build the kernel once for the rest of the pack, then restart.

The honest take

If you're running H3 with a normal sampler and step count, this node will do almost nothing for you by design - auto falls back to standard and the gains are modest. The win is specific: 4-step and 8-step speed-LoRA schedules, where the exact-trajectory profiles can skip a meaningful chunk of compute. If that's you, this is a free speedup worth testing. If it isn't, don't force it - the node's conservatism is a feature, and fighting it with a "just cache everything" workflow is how you get mushy video.

CategoryTuring Utils/optimization

Inputs (3)

NameTypeDefaultDescription
modelMODEL
profileCOMBOautoAuto selects a conservative preset only for an exact 4- or 8-step trajectory; all other schedules use standard.
cache_deviceCOMBOautoAuto honors ComfyUI's free-VRAM reserve; skipped blocks also stay out of its Dynamic VRAM prefetch queue. CPU uses ComfyUI-managed pinned memory when available.

Outputs (1)

NameTypeDescription
MODELMODEL