MiniMax H3 FastPath Euler Middle Cache
Skip the middle of MiniMax H3 and keep both ends exact
- model
- model
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:
- Runs your
prefix_blockstransformer blocks exactly. - Samples a small probe from the prefix output and saves the hidden state.
- Runs every middle block exactly, then stores the residual (middle output − middle input).
- Runs the
suffix_blocksexactly.
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 default8): 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.cpusaves VRAM - a real consideration, since one residual runs roughlysequence length × 5376 × bytes per elementper 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_scheduleis stilltruewith no scheduled-LoRA signature in the workflow, or your sampler isn't stock Euler. Turn onverbose- it logs the sampler decision, cached range, and end-of-run stats. - "only supports the native MiniMaxH3Model." It patches a
diffusion_modelof typeMiniMaxH3Model; 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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| enabled | BOOLEAN | true | — |
| prefix_blocks | INT | 81–48 | Exact blocks run before the cached middle on every model call. |
| suffix_blocks | INT | 81–48 | Exact final blocks run after the cached middle on every model call. |
| reuse_threshold | FLOAT | 0.1200–2 | Maximum relative change in a sampled prefix feature before reuse is rejected. |
| max_consecutive_reuses | INT | 11–4 | One gives FULL/PART/FULL for three calls at the same LoRA strength. |
| cache_device | COMBO | GPU is fastest. CPU saves VRAM but transfers one full hidden residual on reuse. | |
| require_fastpath_schedule | BOOLEAN | true | Refuse approximation unless the matching FastPath scheduled-LoRA signature is present. |
| strict_branch_identity | BOOLEAN | true | Use the exact path if ComfyUI does not provide CFG branch labels. |
| suppress_candidate_prefetch | BOOLEAN | true | On likely reuse calls, stop dynamic INT8 weight prefetch so skipped blocks are not streamed anyway. |
| verbose | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |