MiniMaxH3LatentLabUltraPinnedMemoryRestore
Putting ComfyUI's pinned-memory setting back where you found it
- final_av
- final_av
Every MiniMaxH3LatentLabUltraPinnedMemoryGate needs its cleanup crew, and this is it. The Gate temporarily turns off ComfyUI's pinned memory so an oversized H3 checkpoint can stream weights without exhausting host buffers. MiniMaxH3LatentLabUltraPinnedMemoryRestore is the second half of that transaction: it takes the flag you saved before sampling and flips ComfyUI's global setting back to it. No restore node, and your ComfyUI keeps running in an unintended state - which is exactly how you get weirdly sluggish behavior that's a pain to hunt down.
The node is a passthrough with a side effect. In: final_av (LATENT - the AV latent you're done with), previous_disable_pinned_memory (BOOLEAN, the value the Gate emitted), and restore (BOOLEAN, default true). Out: final_av unchanged. If restore is false, it does nothing and just forwards the latent - handy if you want to keep the flag off for a while longer, though you'd be working against the design.
The correct wiring
[Gate] previous_disable_pinned_memory ──→ [Restore] previous_disable_pinned_memory
[Gate] guider → (your sampler) → final_av ──→ [Restore] final_av
Chain the Gate's previous_disable_pinned_memory output straight into the Restore's matching input, and the whole thing round-trips your ComfyUI setting cleanly. In the pack's public Sampler path this is orchestrated automatically around ultra_low_vram sampling; you only see these two nodes when hand-wiring or debugging.
Install
Same one-pack install, no extra deps:
cd ComfyUI/custom_nodes
git clone https://github.com/vizart-vj/ComfyUI-MiniMax-H3-LongMedia
Restart ComfyUI, or use ComfyUI Manager ("MiniMax H3 LongMedia").
Gotchas
- The
previous_disable_pinned_memoryinput defaults to false, so if you leave it disconnected the node will restore "pinned memory enabled" - which is usually the safe state, but it defeats the point of the Gate. - It's an Internal-category helper; don't go hunting for it in Add Node by name unless you're already in a LongMedia workflow that dropped it in.
- The H3 weights carry the pack-wide license caveat: excluded from the US, EU, UK and South Korea.
Undramatic, tiny, and necessary. This node is why you can run the Gate at all without treating ComfyUI like a snow globe you shake and hope settles right.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| final_av | LATENT | — | |
| previous_disable_pinned_memory | BOOLEAN | false | — |
| restore | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| final_av | LATENT | — |