Nodes/MiniMax H3/MiniMax H3 TeaCache Args
ComfyUI Node

MiniMax H3 TeaCache Args

MiniMax H3 TeaCache Args — the free-ish speedup, if you can live with slightly less detail

By xiaolibai-sys·Created about a month ago·Updated 29 days ago· 10
MiniMax H3 TeaCache Args
    • teacache_args
    start_block3
    max_skip_blocks15
    rel_l1_thresh0.08
    warmup_steps1
    cooldown_steps2

    Adjacent denoising steps barely differ - the latent at step 20 looks a lot like the latent at step 21. TeaCache is the observation that you can skip expensive transformer blocks on steps where nothing much changed, and this node is where you configure how aggressive that skipping is for H3. It's the same block-skipping family of trick the Wan crowd benchmarked to death, applied to H3's 33B DiT - which is exactly the model where it pays off, because every skipped block run is billions of parameters you didn't compute.

    How it works

    At each step, starting from start_block, the sampler compares the current block's output to the cached version from the previous step. If the mean L1 distance is below rel_l1_thresh, it treats it as a cache hit and skips up to max_skip_blocks consecutive blocks, reusing their last computed outputs instead of recomputing. Two guardrails keep it from drifting: warmup_steps at the start and cooldown_steps at the end always compute fully (the trajectory actually moves there), and the skip is bounded per step. The output is a frozen config object - a MINIMAX_H3_TEACACHE - that the KSampler reads.

    The inputs that matter

    • rel_l1_thresh - the one you'll actually tune. Default 0.08. Higher = more cache hits = faster, with quality erosion at the top end; lower = more faithful. Start at the default and push it up in small steps if you need more speed.
    • start_block - default 3. First block where cache checks engage. The earliest blocks are cheap and change a lot; let the expensive middle blocks do the skipping.
    • max_skip_blocks - default 15 (out of 50 total). The ceiling per hit. Cap it lower if you see artifacts.
    • warmup_steps (default 1) and cooldown_steps (default 2) - always-full steps at the extremes of the schedule. Safe to leave.

    One output: teacache_args, wired into the KSampler's optional teacache_args socket. No input sockets - it's pure config.

    Installing it

    Pack-wide routine - ComfyUI Manager search "MiniMax H3", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xiaolibai-sys/ComfyUI-MiniMaxH3
    pip install -r requirements.txt
    

    then restart. Pure config node, no models.

    Common issues

    • Speedup invisible. TeaCache only engages across many steps with a real signal - if you're on 8 steps with default warmup/cooldown, most of your run is protected, so there's little to skip. Its sweet spot is 20–40 step renders.
    • Detail gets wobbly. That's rel_l1_thresh too high or max_skip_blocks too permissive. Dial the threshold down.
    • Benchmarking against the wrong thing. It's a quality-vs-time trade, not a free lunch. The defaults are conservative for a reason - compare outputs at the same seed before you commit to aggressive settings.
    CategoryMiniMax-H3/sampling

    Inputs (5)

    NameTypeDefaultDescription
    start_blockINT30–49First block where cache checks are enabled.
    max_skip_blocksINT151–50Maximum number of consecutive blocks skipped on a cache hit.
    rel_l1_threshFLOAT0.080–1Reuse the cache when mean L1 distance is below this threshold. Higher values are faster but may reduce quality.
    warmup_stepsINT10–100Steps at the start that always compute fully.
    cooldown_stepsINT20–100Steps at the end that always compute fully.

    Outputs (1)

    NameTypeDescription
    teacache_argsMINIMAX_H3_TEACACHE