H3 AIMDO Residency Limiter
The H3 VRAM pressure valve for OOMs that shouldn't happen
- model
- MODEL
H3 is a 33B omni-modal video model with roughly 42 GB of weights, and the fight on a consumer card is rarely the model math - it's memory management. The H3 AIMDO Residency Limiter exists for a very specific failure: ComfyUI underestimates how much working memory the video needs, keeps too much of the model parked in VRAM, and then the generation dies with an out-of-memory error even though that resolution and length would actually fit.
This node doesn't touch a single weight. It's a model patch that tells ComfyUI to keep less of the H3 model resident on the GPU, leaving more room for the video's activations and temporary buffers. The README is explicit about the trade: you're trading a little speed (ComfyUI must stream model weights back in as needed) for the difference between a render that completes and one that doesn't.
What it actually does
AIMDO is the model-weight streaming system behind ComfyUI's DynamicVRAM. After each dynamic model load, this node caps how much of that streamed weight stays persistently on the GPU. You get one input that matters - model goes in, a patched MODEL comes out - and one setting: residency, a combo that defaults to 2 blocks.
2 blocksis the recommended starting point.0 blocksis the most aggressive limit; it retains no persistent pages at all.stockturns the limiter off and restores ComfyUI's normal behavior.
Two honest caveats from the author: the numeric choices are block-equivalent byte budgets, not guaranteed coherent blocks, and they only bite if DynamicVRAM with async weight offloading is active - otherwise the node reports itself inactive in its status text. It also can't promise everything will fit, because it restrains model memory rather than capping total GPU use. Activations, temporary streaming buffers, and force-loaded weights are all outside its reach.
Install
Grab the whole pack, because the limiter lives inside it:
cd ComfyUI/custom_nodes
git clone https://github.com/Zironic/H3-Optimizations
Then restart ComfyUI. Installing via ComfyUI Manager (search "H3 Optimizations") works too and keeps it updateable. The pack ships its native binaries and carries no extra pip dependencies - nothing downloads or compiles on startup.
When to reach for it
This is a targeted fix, not a daily driver. If your long or high-res H3 renders OOM and you suspect the model, not the video, is hogging the card, drop this node between the model loader and the sampler, start at 2 blocks, and check the node's status text to confirm the limiter actually armed (it prints whether DynamicVRAM is active). If things got faster but you're no longer crashing, great. If a lower setting slows you down noticeably, remember the model's weights are being streamed more aggressively - that's the price of the headroom.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| residency | COMBO | 2 blocks | stock leaves AIMDO residency management unchanged. The numeric choices cap the low-address VBAR prefix to that many largest H3 block page footprints. They are block-equivalent byte budgets, not guaranteed coherent blocks. 0 blocks retains no persistent VBAR pages; the current block is still staged through temporary async buffers. Requires DynamicVRAM and async weight offloading. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |