Nodes/H3 SGLang Pack/MiniMax H3 Cache-DiT (SGLang)
ComfyUI Node

MiniMax H3 Cache-DiT (SGLang)

The free-speed node that comes with a 'your mileage may vary' sticker

By TensorClay·Created about a month ago·Updated 22 days ago· 6
MiniMax H3 Cache-DiT (SGLang)
  • model
  • model
max_warmup_steps4
residual_diff_threshold0.040
max_continuous_cached_steps1

Cache-DiT is the trick where a diffusion transformer skips whole blocks when the residual change between steps is small - the assumption being that most blocks barely need to recompute during most of the denoise. In the wider SGLang world people report 20–165% faster generation from it. MiniMax H3 Cache-DiT (SGLang) exposes that integration for H3 inside this pack's workers. And then the pack's own README does the honest thing and shows that on its tested workload it made things slower - by a hair, well inside run-to-run noise, but not faster.

Read that as the warning it is: this node is a "maybe free speed" knob, not a guaranteed one, and it trades exact output parity for approximation. You benchmark it on your own workload before you trust it.

The inputs

Four total, and the defaults are a sane starting point:

  • model - an H3 SGLang model from the pack's loader or LoRA node. Wrong input type and you get the same clear TypeError as the other pack nodes.
  • max_warmup_steps (default 4) - how many full-compute steps run before cache reuse is allowed. Diffusion is most volatile early, so you don't want to cache from step zero.
  • residual_diff_threshold (default 0.04) - the maximum residual change that still lets a block's cached result be reused. Higher = more aggressive caching, more approximation, more speed when it works.
  • max_continuous_cached_steps (default 1) - the most consecutive reused steps before a full refresh forces the accumulated error back down.

Output is a MODEL, and you place the node between the model loader (or LoRA node) and the guider.

How it works

Cache state is scoped to a single sampling execution and released when that execution ends - no cache survives across jobs, so consecutive runs each pay the setup cost. That fixed setup cost is the reason the README's numbers came out neutral-to-slightly-negative: on a heavy Ref2VA run, both tested presets completed with correct video and audio but at 0.1%–0.6% slower than no cache. Different workloads, different Cache-DiT versions, different hardware may behave differently - the author says so explicitly.

Installing it

The pack itself is installed the usual way (ComfyUI Manager, search "H3 SGLang Pack", or clone https://github.com/TensorClay/ComfyUI-H3-SGLang-Pack into ComfyUI/custom_nodes and restart). Cache-DiT itself is an optional dependency that isn't auto-installed:

pip install cache-dit

That goes into the same Python environment as ComfyUI (and SGLang Diffusion, which is the pack's real prerequisite). If you haven't installed it, the worker fails at generation time with a message pointing at the missing cache-dit package.

Where people get burned

Two things trip people up. First, the node silently doesn't help on workloads where the residual budget never gets small - you won't get an error, you'll get a slightly slower run with a cached and less-exact output. Second, "cached" here means approximate: if you're doing final-quality renders where you'd notice subtle block artifacts, this is a knob to leave off. For iteration and previews, it's worth one benchmark run to see if your setup is one of the lucky ones. If your heavy workload looks like the README's, leave it disconnected and spend the setup time elsewhere.

CategorySGLang/MiniMax H3

Inputs (4)

NameTypeDefaultDescription
modelMODEL
max_warmup_stepsINT40–100
residual_diff_thresholdFLOAT0.0400–1
max_continuous_cached_stepsINT10–100

Outputs (1)

NameTypeDescription
modelMODEL