Fast Latent To Image Node
A 3 KB 'fake VAE' that previews SDXL latents in milliseconds
- latent
- IMAGE
FastLatentToImage is a tiny "approximate VAE" that turns an SDXL latent into an actual image in milliseconds, so you can see what a generation looks like mid-sampling without paying for a full VAE decode. It's from July 2023 - the early SDXL access era, when every second of sampling felt precious and previews were the main thing eating your wall-clock time. It's a museum piece now, but it's a free museum piece: the whole model is a 3 KB weights file bundled in the repo, zero extra downloads, zero dependencies.
First, the pack name. It's ComfyUI_FastVAEDecorder_SDXL - "Decorder." Yes, misspelled, and the typo is how you'll find it in ComfyUI Manager. Search "FastVAE" or the full title and you'll land on it.
How it works
The node is a port of Birch-san's approx_vae. Where a real VAE decoder is a deep convolutional network that upscales the latent 8× back to pixel space, this one is a 3-layer perceptron that maps each latent pixel independently: 4 channels → 12 → 12 → 3 RGB. That's it. Per-pixel regression, no upscaling at all.
The important consequence: the output comes out at latent resolution. A 1024×1024 SDXL generation has a 128×128 latent, so you get a 128×128 preview. That's fine for "is the composition right, did the subject materialize," and useless as a final image. It's a preview node, not an output node - the README's own framing is "quickly preview SDXL 1.0 latents."
The weights (decoder_sdxl.pt, 3.2 KB) ship inside the repo, get loaded once when the node initializes, and the model runs on CUDA if you have it, CPU otherwise. Cheap enough to be effectively free on every step.
Inputs and outputs
The whole interface is one input and one output, which is honestly the point.
latent(LATENT, required) - feed it theLATENToutput of a KSampler or anything else in your SDXL graph.IMAGE(output) - wire this into aPreview ImageorSave Imagenode. This node isn't an output node itself, so it won't pop a preview on its own; it just hands you an image tensor like any other.
Install
Standard custom node, nothing exotic:
cd ComfyUI/custom_nodes
git clone https://github.com/nagolinc/ComfyUI_FastVAEDecorder_SDXL
Then restart ComfyUI. Or use ComfyUI Manager and search the pack title - it's published to the Comfy Registry, so Manager can handle it too. There are no Python dependencies beyond what ComfyUI already ships (just torch, numpy, PIL), and the weights come with the clone, so nothing else to fetch.
Where people get burned
- The output is 128×128 at 1024×1024. If you treat it as your final image you'll get a blurry thumb. It's a preview; decode properly for the real thing.
- It's SDXL-tuned. The weights were trained on SDXL latents. SD 1.5 is also 4-channel so it'll run, but the preview quality will be off. Feed it a Flux latent (16 channels) and the
Linear(4, 12)input layer throws a shape error. - Silent failure if the weights are missing. The loader only loads
decoder_sdxl.ptif it exists - if it's gone, the network just never loads and you get random gray garbage with zero error. Keep the file next tofastDecoder.py.
And the honest take: since 2023, ComfyUI's TAESD-based previews have become the standard fast-decode path, and they decode at full resolution with far better quality. This node's niche is old workflows, teaching yourself how latents map to pixels, or just the novelty of a 3 KB neural network that "works." For day-to-day previewing, you'd reach for TAESD first. But it's a tidy piece of history, and for its age it still does exactly what it says.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |