Nodes/ComfyUI-MiniMax-H3-FastPath/MiniMax H3 FastPath Euler Middle Cache
ComfyUI Node

MiniMax H3 FastPath Euler Middle Cache

Skip the middle of MiniMax H3 and keep both ends exact

By capitan01R·Created 28 days ago·Updated 28 days ago· 1
MiniMax H3 FastPath Euler Middle Cache
  • model
  • model
enabledtrue
prefix_blocks8
suffix_blocks8
reuse_threshold0.120
max_consecutive_reuses1
cache_device
require_fastpath_scheduletrue
strict_branch_identitytrue
suppress_candidate_prefetchtrue
verbosefalse

MiniMax H3 is a 33-billion-parameter video model with native audio, and that bigness has a cost: every sampling step grinds through the whole transformer, and a 5-second clip is measured in minutes, not seconds. MiniMax H3 FastPath Euler Middle Cache (class MiniMaxH3EulerMiddleCache) is a sampling-time speed hack that assumes the interesting part of generation happens in the first and last blocks of that transformer - and reuses the middle between steps instead of recomputing it.

Straight to the honest framing: this is an approximation, and it only fires under very specific conditions. When it does, it skips a chunk of the model on some Euler steps. When it can't, it silently runs the full exact path. It's a brand-new (v1.0.0) effort from a solo author, capitan01R, with zero community track record - so treat it as a "measure the speedup and eyeball the output" tool, not a set-and-forget win.

How it works

This is residual caching, the same family of idea as DeepCache but scoped to one model. On a full eligible call the node:

  1. Runs your prefix_blocks transformer blocks exactly.
  2. Samples a small probe from the prefix output and saves the hidden state.
  3. Runs every middle block exactly, then stores the residual (middle output − middle input).
  4. Runs the suffix_blocks exactly.

On the next call with the same conditioning branch and model-strength signature, the prefix still runs exactly, the node compares the new probe to the saved one, and if the change is within reuse_threshold (default 0.12) it adds the cached residual to the hidden state, skips the whole middle range, and continues into the exact suffix. That's where the time goes away.

The cache state is isolated per CFG branch and cleared at the start and end of each sampling run, so a reuse never crosses between positive and negative passes.

The inputs that matter

You can leave most of the 11 widgets alone. The three worth touching:

  • prefix_blocks / suffix_blocks (both default 8): how many exact blocks frame the cached middle. Their sum must stay below the model's block count, and the node refuses to install if they don't. More exact blocks = safer but slower.
  • reuse_threshold (0.12): how much the prefix probe may drift before reuse is rejected. Lower = fewer but more trustworthy reuses.
  • cache_device (gpu): GPU is fastest. cpu saves VRAM - a real consideration, since one residual runs roughly sequence length × 5376 × bytes per element per active branch.

The one that will bite you is require_fastpath_schedule (default true). It means approximation only happens when the model call carries a matching per-call FastPath LoRA-strength signature - something a companion scheduled-LoRA workflow in the same FastPath family stamps in. If that signature is absent, the node falls back to the exact path. For a standalone model whose weights stay static during sampling, set it to false, or you'll see zero speedup and think the node is broken.

The single output is a patched MODEL, wired straight into your existing KSampler. Everything upstream - conditioning, latent, guider, VAE - is untouched.

When it refuses to fire

The guardrails are strict, and they're the feature. Reuse is only enabled for the stock Euler sampler (sample_euler); any other sampler runs the full exact path. Multi-GPU calls, missing CFG branch labels (when strict_branch_identity is on), a changed LoRA-strength signature, or an out-of-memory during cache allocation all disable caching for that run and continue exact. The node also refuses to install at all if a whole block-loop replacement is already active, or if you try to stack it on top of Spectrum forecasting - both will throw a clear error.

Installing

Either grab it from ComfyUI Manager (search "MiniMax H3 FastPath"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/capitan01R/ComfyUI-MiniMax-H3-FastPath.git

Restart ComfyUI. No extra Python packages - it only needs a ComfyUI with native MiniMax H3 support, which landed day-zero with the model. One caveat that predates this node: H3's weights are geofenced out of the US, EU, UK and Korea, so in those regions the bigger blocker is running the model at all, not this node.

Troubleshooting

  • Installed it, nothing got faster. Most likely require_fastpath_schedule is still true with no scheduled-LoRA signature in the workflow, or your sampler isn't stock Euler. Turn on verbose - it logs the sampler decision, cached range, and end-of-run stats.
  • "only supports the native MiniMaxH3Model." It patches a diffusion_model of type MiniMaxH3Model; a converted or wrapped model won't take the patch.
  • Exact output required? Disable the node (enabled: false) and it returns the cloned model unpatched.

It's an approximation - the author says so plainly. Worth a test run if H3's render times are your bottleneck, but verify quality before trusting a batch of frames to it.

CategoryMiniMax H3/FastPath

Inputs (11)

NameTypeDefaultDescription
modelMODEL
enabledBOOLEANtrue
prefix_blocksINT81–48Exact blocks run before the cached middle on every model call.
suffix_blocksINT81–48Exact final blocks run after the cached middle on every model call.
reuse_thresholdFLOAT0.1200–2Maximum relative change in a sampled prefix feature before reuse is rejected.
max_consecutive_reusesINT11–4One gives FULL/PART/FULL for three calls at the same LoRA strength.
cache_deviceCOMBOGPU is fastest. CPU saves VRAM but transfers one full hidden residual on reuse.
require_fastpath_scheduleBOOLEANtrueRefuse approximation unless the matching FastPath scheduled-LoRA signature is present.
strict_branch_identityBOOLEANtrueUse the exact path if ComfyUI does not provide CFG branch labels.
suppress_candidate_prefetchBOOLEANtrueOn likely reuse calls, stop dynamic INT8 weight prefetch so skipped blocks are not streamed anyway.
verboseBOOLEANfalse

Outputs (1)

NameTypeDescription
modelMODEL