Nodes/comfyui-darkil-nodes/VAE Load Later [darkilNodes]
ComfyUI Node

VAE Load Later [darkilNodes]

A VAE loader that waits for the trigger, for when the VAE is the last thing you want in VRAM

By pytraveler·Created 7 months ago·Updated 15 days ago· 9
VAE Load Later [darkilNodes]
  • any_trigger
  • VAE
vae_name

VAEs are small compared to the diffusion model and text encoders, so a "load later" VAE node sounds like the least necessary member of the family. But there's a genuinely useful pattern here: in a workflow where the VAE is only needed at the very end - for a decode you might not even run, or in a branch that's only occasionally active - this node keeps even that modest footprint out of memory until a trigger fires. It's the stock VAELoader with an any_trigger input prepended, nothing more, nothing less.

How it works

The implementation is the same template as the other "later" loaders in this pack: subclass ComfyUI's VAELoader, add the wildcard any_trigger input, and when the trigger resolves call the parent's load_vae with your chosen vae_name. Because the node depends on whatever you connect to any_trigger, it executes at that point in the chain instead of at graph start - the VAE materializes exactly when you've decided you actually need it.

Inputs and outputs

  • any_trigger (*) - the gate. Wire anything in; it just needs to resolve after the work you want done first.
  • vae_name - selected from your vae folder, same list the stock loader shows.

Output: a single VAE, which feeds a VAEDecode (or VAEEncode) node exactly like any other VAE output. The node lives in the darkilNodes/logic category.

Where people get burned

The usual caveat applies and then some: the VAE is often needed by both encode and decode, and if your graph encodes at the start, gating the VAE on something late means the encode path will block until the trigger resolves. Wire the trigger to an early-but-upstream node in that case, or you'll sit staring at a stalled queue for no reason. It's also worth saying plainly: if your workflow is a single straight line, this node buys you almost nothing - deferral matters when a branch is optional or when peak memory during a long prep phase is a real constraint.

Installing

Same pack as all the others. ComfyUI Manager search ComfyUI-darkil-nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/comfyui-darkil-nodes

Restart ComfyUI. No Python deps, no model downloads - it reads from the vae folder you already have.

CategorydarkilNodes/logic

Inputs (2)

NameTypeDefaultDescription
any_trigger*
vae_nameCOMBO1 options: pixel_space

Outputs (1)

NameTypeDescription
VAEVAE