Auto VAE Loader (MultiGPU)
Keep the decoder off the sampler's card
- VAE
This is the smallest node in the ComfyUI-AutoMultiGPU pack, and it does exactly one thing: load a VAE and pin it to your secondary GPU. The theory is sound - VAE decode is a spikey operation, and if your sampler is chewing through GPU0's VRAM, decoding on the same card at the end of the run is a classic OOM trigger. Move the VAE to cuda:1 and the final decode has its own card to explode on.
Honestly, this is the node you grab when you're already in this pack's ecosystem and want the modular-loaders route rather than a bundled engine. On its own it's a VAE loader with a device preference - useful, but not life-changing unless you're actually hitting decode-time OOMs or running big video latents.
How it works
It pulls the VAE from ComfyUI's standard vae folder (same list the stock VAELoader shows), then after loading it sets the VAE's device and its ModelPatcher's load_device to your chosen target. The default target is "Auto (Secondary GPU - cuda:1)", which gracefully falls back to cuda:0 on single-GPU machines, then to CPU. Nothing fancy - no GGUF support here, no tiling, just device placement. If a VAE resists the device reassignment it logs a quiet debug note and carries on, which is why the node tends to just work.
The inputs that matter
Two widgets, that's the whole thing:
- vae_name - the VAE file (includes the
pixel_spaceoption in this pack's ecosystem, plus anything in yourvaefolder). - target_device - "Auto (Secondary GPU - cuda:1)" default, with
cuda:1,cuda:0, andcpuas explicit choices.
Output is a single VAE that wires into VAEDecode/VAEEncode like any other.
Installing it
Same pack, same routine:
cd ComfyUI/custom_nodes
git clone https://github.com/nexusfinancial-dev/ComfyUI-AutoMultiGPU.git
cd ComfyUI-AutoMultiGPU
pip install -r requirements.txt
Dependencies: torch, accelerate, safetensors - all already present. No extra downloads.
Where people get burned
Don't expect this to shrink VRAM usage overall - the VAE still loads, it just loads somewhere else. If your second GPU is already full of text encoders (see the CLIP loaders in this pack), there's no free lunch; something has to give. And on a single-card rig this is functionally identical to the stock VAE loader with extra steps, so don't add it just to feel busy. Its place is a two-GPU build where the decode is the step that keeps dying.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| vae_name | COMBO | 1 options: pixel_space | |
| target_device | COMBO | Auto (Secondary GPU - cuda:1) | 4 options: Auto (Secondary GPU - cuda:1), cuda:1, cuda:0, cpu |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VAE | VAE | — |