Nodes/ComfyUI_JR_MiniMaxH3Node/JR H3 Adaptive Cache
ComfyUI Node

JR H3 Adaptive Cache

The H3 cache node that's honest about being experimental

By Goldlionren·Created 21 days ago·Updated about 9 hours ago· 28
JR H3 Adaptive Cache
  • model
  • cache_config
  • MODEL
  • selected_profile
  • status
modeAuto
quality_levelBalanced
audio_contentAuto
profile_hint
start_percent0.10
end_percent0.90
warmup_steps2
front_blocks1
back_blocks2
video_threshold0.020
audio_threshold0.012
fast_path_threshold0.008
probe_path_threshold0.035
max_full_step_hits1
max_block_hits2
video_metric_stride12
audio_metric_stride6
cache_deviceAuto
gpu_reserve_mb2048
strict_model_checktrue
verbosefalse

DiT block caching is the hot optimization for video models - reuse a block's output when nothing changed much, skip real work, get faster steps. The JR H3 Adaptive Cache is this pack's entry, and the single most important thing to know is its own disclaimer: it's an experimental, content-dependent optimization. Picking a profile doesn't guarantee a hit, and the README is explicit that full_hits=0 or block_hits=0 in the log might simply mean your sampling changed too much this run. Don't read a "selected dialogue_safe" status as a promise of speedup.

Mechanically it's a scene-aware dual-stream cache for the native 50-block MiniMaxH3Model - it tracks both the video and audio streams separately, and it runs two cache paths: a full-step path (skip an entire denoising step when the scene metric says nothing moved) and a block-probe path (skip individual blocks within a step). It detects the real block count at runtime rather than hard-coding model filenames, so bf16, INT8, and Ref2VA weight files all work as long as they load into a compatible native H3 model - and with strict_model_check=true (the default), incompatible models error loudly instead of misbehaving quietly.

What you actually set

  • model (MODEL) in, patched MODEL out, plus selected_profile and status strings for logging.
  • mode - Auto plus content presets (Visual Fast, Dialogue Safe, Action Safe, Balanced, Off). These map to the scene classifier.
  • quality_level - Conservative / Balanced / Aggressive, or Custom to hand-tune the threshold fields (start_percent, end_percent, warmup_steps, video_threshold, audio_threshold, front_blocks, back_blocks, hit caps, metric strides…). There are a lot of them; the presets exist so you don't have to touch them.
  • audio_content - Auto/None/Speech/Singing/Music/Ambient. Tells the classifier what the audio track is so it can be conservative where it matters.
  • cache_device - Auto decides whether large residuals live on GPU or CPU. CPU hits get moved back to the target tensor's device/dtype only when they're used, which is the mechanism that saves VRAM. gpu_reserve_mb sets how much VRAM to keep clear.

The router integration

The optional cache_config input is the interesting wiring: when you connect the cache_config output of the Cache Config Router, all the manual widgets are ignored as a group and the router's classified profile takes over. Wire it like the README shows: Optimizer.optimized_prompt → CacheConfigRouter → cache_config → AdaptiveCache.cache_config.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Goldlionren/ComfyUI_JR_MiniMaxH3Node
<your-comfyui-python> -m pip install -r ComfyUI_JR_MiniMaxH3Node/requirements.txt

or ComfyUI Manager → search ComfyUI_JR_MiniMaxH3Node.

Troubleshooting

  • "Unsupported model" with strict checks on - the model didn't load as a compatible native H3 structure (maybe a non-native quantization path). Either disable strict_model_check or fix the load.
  • No speedup despite a profile - expected behavior, not a bug. Cache hits are content-dependent; check the log's hit counters before judging.
  • Don't stack it. The README's conflict list is worth memorizing: don't combine this with EasyCache, TeaCache, First Block Cache, CacheDiT, any other DiT block-replacement cache, or a second JR cache. Sage/Flash attention, quantization, dynamic VRAM, CPU offload and the RTX/video nodes are all fine alongside it.
CategoryJR MiniMax H3/Cache

Inputs (23)

NameTypeDefaultDescription
modelMODEL
modeCOMBOAuto6 options: Auto, Visual Fast, Dialogue Safe, Action Safe, Balanced, Off
quality_levelCOMBOBalanced4 options: Conservative, Balanced, Aggressive, Custom
audio_contentCOMBOAuto6 options: Auto, None, Speech, Singing, Music, Ambient
profile_hintSTRING
start_percentFLOAT0.100–0.99
end_percentFLOAT0.900.01–1
warmup_stepsINT20–100
front_blocksINT10–48
back_blocksINT20–48
video_thresholdFLOAT0.0200–1
audio_thresholdFLOAT0.0120–1
fast_path_thresholdFLOAT0.0080–1
probe_path_thresholdFLOAT0.0350–1
max_full_step_hitsINT10–20
max_block_hitsINT20–20
video_metric_strideINT121–1024
audio_metric_strideINT61–1024
cache_deviceCOMBOAuto3 options: Auto, GPU, CPU
gpu_reserve_mbINT20480–131072
strict_model_checkBOOLEANtrue
verboseBOOLEANfalse
cache_configoptJR_H3_CACHE_CONFIG

Outputs (3)

NameTypeDescription
MODELMODEL
selected_profileSTRING
statusSTRING