Nodes/ComfyUI-DaSiWa-Nodes/MiniMax H3 Cache
ComfyUI Node

MiniMax H3 Cache

MiniMax H3 Cache

By darksidewalker·Created 5 months ago·Updated 4 days ago· 109
MiniMax H3 Cache
  • model
  • MODEL
reuse_threshold0.05
start_percent0.15
end_percent0.90
max_steps2
deviceauto
verbosefalse

MiniMax H3 is a big multimodal model - big enough that 15-second generations on a consumer card are a wait-and-see project. Speed tricks are going to matter, and MiniMax H3 Cache is the pack's answer: an approximate cache that reuses the output of the model's whole transformer block stack when the feature signature of a step hasn't changed enough to bother recomputing it. Think of it as skipping work between similar diffusion steps. Video generation is full of steps where little actually changes, so there's real time to save - at the cost of some fidelity.

This isn't a novelty. It's a reimplementation, GPL-3.0-compatible, of the cache algorithm from lihaoyun6's ComfyUI-MiniMaxH3-Cache (with lifecycle design studied from silveroxides' UtilsCollection). What the DaSiWa version does differently is scope: it clones only the connected MODEL and patches that one clone's forward pass. No global monkey-patch of the MiniMaxH3Model class, so your other models and workflows are untouched.

The controls

  • reuse_threshold (default 0.05) - the maximum accumulated relative L1 change in the sampled audio/video-token signature before the cache must refresh. Bigger = skips more block-stack evaluations = faster but potentially softer output. This is the fidelity dial; start at the default and nudge up only if quality holds.
  • start_percent / end_percent (defaults 0.15 / 0.90) - the window of the sigma schedule where reuse is allowed. Early and late steps are usually where fidelity matters most, which is why the default doesn't cache the full range.
  • max_steps (default 2) - the cap on consecutive cache hits, so it can't coast forever on a stale signature.
  • device - auto keeps residuals with the active model, cuda forces it, cpu offloads residuals to system RAM (the fallback if auto runs out of VRAM).
  • verbose - logs individual decisions and a theoretical block-stack speedup.

Inputs are model (a MiniMax H3 MODEL) and it outputs a patched MODEL - drop it on the model path before your guider/sampler.

Installing and wiring

ComfyUI Manager (search DaSiWa-Nodes), or:

cd ComfyUI/custom_nodes
git clone https://github.com/darksidewalker/ComfyUI-DaSiWa-Nodes
pip install -r requirements.txt

then restart. Wiring is one splice:

MiniMax H3 Model Loader
          │
          ▼
MiniMax H3 Cache ──► (optional) Patch Comfy Kitchen Attention ──► Guider / Sampler

Both the Cache and the attention patch are model-clone patches, so they chain in either order. On a cache-hit step no attention backend runs at all; on a cache-miss step the attention override still applies normally.

Where people get burned

  • It only works on H3. The node rejects other model architectures - it's tied to ComfyUI's native MiniMaxH3Model. Feed it a Wan model and it'll tell you so.
  • ComfyUI too old. It needs a ComfyUI that exposes ModelPatcher.add_object_patch, set_model_patch_replace, and add_wrapper. Old builds throw. Update ComfyUI.
  • The speedup is theoretical. verbose's number is a block-stack ratio, not an end-to-end benchmark - VAE encode/decode and the sampler still cost what they cost. Don't expect the wall-clock time to match the logged ratio.
  • Quality drift. This is an approximation by design. The pack's own docs warn you to compare cache-on vs cache-off with the same seed, prompt, and settings - and specifically to check audio continuity, motion stability, and reference adherence. Audio is where approximate caches tend to betray you first.
  • The claims. "This is 30% faster than X cache" from a random post is worth exactly nothing without matched benchmarks. Judge it against your own runs.

Worth a try if H3 generation speed is your bottleneck - and with a 15-second reference window on consumer hardware, it probably is. Just treat reuse_threshold as a knob you tune against visible quality, not a number to max out.

CategoryDaSiWa/MiniMax H3

Inputs (7)

NameTypeDefaultDescription
modelMODEL
reuse_thresholdFLOAT0.050–1
start_percentFLOAT0.150–1
end_percentFLOAT0.900–1
max_stepsINT21–10
deviceCOMBOauto3 options: auto, cuda, cpu
verboseBOOLEANfalse

Outputs (1)

NameTypeDescription
MODELMODEL