Nodes/😸 YFG Comical Nodes/🐯 YFG VAE Decode with Preview
ComfyUI Node

🐯 YFG VAE Decode with Preview

See your render without wiring a second node

By gonzaluΒ·Created 2 years agoΒ·Updated a day agoΒ· 29
🐯 YFG VAE Decode with Preview
  • samples
  • vae
  • IMAGE

The core VAEDecode in ComfyUI is a silent workhorse. Latent goes in, image comes out, and you don't see a thing until you've wired it into a SaveImage or a preview node. YFG VAE Decode with Preview closes that gap: it's a drop-in replacement that decodes your latent, shows the result right on the node, and still hands the image out on the IMAGE socket so the graph keeps moving. Two inputs, one output, no extra nodes between you and what the sampler actually drew.

You'll reach for it in any workflow where you want to peek before you commit. Sampler β†’ decode β†’ upscale is the classic shape: you want to check the first pass before burning minutes on the second, and stock ComfyUI makes you either add a preview node or save to disk just to look. This collapses both into one node. It's the kind of quality-of-life nicety the YFG Comical pack is built around - several of its nodes descend from the same original code by XSS, and this one is a direct lineage of that.

How it works

The mechanism is simple, and the source is short enough to read in one sitting. It calls vae.decode(samples["samples"]) on your latent, then hands the decoded tensor to ComfyUI's own SaveImage node - but pointed at the temp directory instead of your output folder. The frontend watches that temp folder and draws the thumbnail onto the node itself. Because the class is marked as an output node, queuing the graph runs it like a save node; because it returns the image tensor through the IMAGE output, the preview and the pipeline aren't in competition. You get both, for free.

The inputs and output

There are exactly two inputs, and you already know both from the core node:

  • samples (LATENT) - the latent from your KSampler.
  • vae (VAE) - the VAE that matches your checkpoint.

And one output: IMAGE, which wires straight into an upscaler, another VAE encode, or a normal SaveImage if you want the file kept.

Where people get burned

Two things to keep in mind, both honest ones. First, the preview is a preview: it lives in ComfyUI's temp directory and is gone when you close the app. If you want the image to survive, wire the IMAGE output into a real SaveImage - the node doesn't do that for you. Second, and this applies to every VAE decode, not just this one: the VAE has to match your model's latent space. Slap an SD1.5 VAE on an SDXL latent and you'll get noise or flat gray, not a thumbnail. When that happens, the node isn't broken - your VAE/model pairing is.

Installing it

Install the pack once, and this node comes with it. Via ComfyUI Manager, search for YFG Comical (the pack shows as "🐯 YFG Comical Nodes") and hit install. Or, if you like doing things by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/gonzalu/ComfyUI_YFG_Comical

Restart ComfyUI either way. Dependencies (transformers, typer, typing-extensions, piexif) are declared in the pack's pyproject.toml and Manager installs them automatically. There are no model downloads - it's a pure utility pack, and this node needs nothing beyond what ComfyUI already has.

Once it's in, search "VAE Decode" in the node picker and you'll find it under the 🐯 YFG category. Drop it in where you'd put a plain VAEDecode and you'll never miss the plain one.

Category🐯 YFG

Inputs (2)

NameTypeDefaultDescription
samplesLATENTβ€”
vaeVAEβ€”

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”