JR H3 Adaptive Cache
The H3 cache node that's honest about being experimental
- model
- cache_config
- MODEL
- selected_profile
- status
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, patchedMODELout, plusselected_profileandstatusstrings 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, orCustomto 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_mbsets 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_checkor 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.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| mode | COMBO | Auto | 6 options: Auto, Visual Fast, Dialogue Safe, Action Safe, Balanced, Off |
| quality_level | COMBO | Balanced | 4 options: Conservative, Balanced, Aggressive, Custom |
| audio_content | COMBO | Auto | 6 options: Auto, None, Speech, Singing, Music, Ambient |
| profile_hint | STRING | — | |
| start_percent | FLOAT | 0.100–0.99 | — |
| end_percent | FLOAT | 0.900.01–1 | — |
| warmup_steps | INT | 20–100 | — |
| front_blocks | INT | 10–48 | — |
| back_blocks | INT | 20–48 | — |
| video_threshold | FLOAT | 0.0200–1 | — |
| audio_threshold | FLOAT | 0.0120–1 | — |
| fast_path_threshold | FLOAT | 0.0080–1 | — |
| probe_path_threshold | FLOAT | 0.0350–1 | — |
| max_full_step_hits | INT | 10–20 | — |
| max_block_hits | INT | 20–20 | — |
| video_metric_stride | INT | 121–1024 | — |
| audio_metric_stride | INT | 61–1024 | — |
| cache_device | COMBO | Auto | 3 options: Auto, GPU, CPU |
| gpu_reserve_mb | INT | 20480–131072 | — |
| strict_model_check | BOOLEAN | true | — |
| verbose | BOOLEAN | false | — |
| cache_configopt | JR_H3_CACHE_CONFIG | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| selected_profile | STRING | — |
| status | STRING | — |