Nodes/TrentNodes/VRAM Gated Checkpoint Loader
ComfyUI Node

VRAM Gated Checkpoint Loader

It Doesn't Check Your VRAM. It Refuses to Load Until VidScribe Is Done.

By TrentHunter82·Created 9 months ago·Updated 4 days ago· 36
VRAM Gated Checkpoint Loader
    • model
    • clip
    • vae
    vram_signal
    ckpt_name

    Let's get the name right, because it promises more than it delivers. This node does not measure your VRAM, does not wait for headroom, and will not save you if the checkpoint itself is too big. What it does is enforce execution order: it loads a checkpoint only after VidScribe MiniCPM has produced its vram_cleared output, which only happens once the VLM has finished running and unloaded. If you're running a caption-then-generate pipeline on a mid-range GPU, that sequencing is the difference between working and a hard OOM crash, because a 6–8GB vision model and a diffusion checkpoint are not supposed to be in memory at the same time.

    Think of it as a gate that ComfyUI's own scheduling is doing the work for. The vram_signal input is a required STRING socket - the loader simply cannot execute until that signal arrives, because ComfyUI doesn't run a node until its required inputs are produced. That's the entire trick, and it's a good one.

    How to wire it

    VidScribe (vram_cleared) ──► VRAMGatedCheckpointLoader (vram_signal)
    

    That single connection is the whole setup. VidScribe runs, describes your frames, unloads, emits the signal; only then does the gated loader wake up and load your checkpoint. Without the connection the loader sits there with an empty input and no run.

    Inputs and outputs

    • vram_signal - wire from VidScribe's vram_cleared. Nothing else produces it.
    • ckpt_name - dropdown of your checkpoints.
    • Outputs: model, clip, vae - the same three sockets a normal Checkpoint Loader gives you, ready for the sampler.

    Troubleshooting

    The classic mistake is expecting magic: if the run still OOMs, the signal did its job and the problem is that the diffusion model is too big for your card on its own - no gating fixes that, you need a smaller model or offloading. Also note the value of the signal string isn't validated; it's the arrival that matters, not the contents. And VidScribe's auto-unload is on a 60s timer, but the gated loader doesn't depend on that timer - the signal fires right after inference, so you're not waiting.

    Installing

    This is one of the VRAM Gated family in TrentNodes (Trent/VLM), installed with the whole pack. ComfyUI Manager → "Trent Nodes" → Install, or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TrentHunter82/TrentNodes
    cd TrentNodes
    pip install -r requirements.txt
    

    Restart after installing. If Manager flags the pack (a day-one repo rename left a registry duplicate it still distrusts), the manual clone above is the reliable path.

    CategoryTrent/VLM

    Inputs (2)

    NameTypeDefaultDescription
    vram_signalSTRINGConnect vram_cleared from VidScribe
    ckpt_nameCOMBO0 options:

    Outputs (3)

    NameTypeDescription
    modelMODEL
    clipCLIP
    vaeVAE