Nodes/ComfyUI Essentials/πŸ”§ Image Preview From Latent
ComfyUI Node Runs on cloud

πŸ”§ Image Preview From Latent

Decode, preview, and grab dimensions in one node

By cubiqΒ·Created 3 years agoΒ·Updated about a year agoΒ· 1,152
πŸ”§ Image Preview From Latent
  • latent
  • vae
  • IMAGE
  • MASK
  • width
  • height
β—„tile_size0β–Ί
β—„imageβ–Ύβ–Ί

Normally decoding a latent and previewing it takes two nodes and two wires: VAE Decode, then Preview Image. Image Preview From Latent collapses that into one, and throws in the pixel width/height as bonus outputs so you're not reaching for a separate Get Image Size node either.

What it actually does

Its own description in the node's schema is blunt about it: it "saves the input images to your ComfyUI output directory." This is a real output node (is_output_node: true), meaning it behaves like Preview Image or Save Image - it actually writes into ComfyUI's output/temp folder and renders in the UI when the graph runs, rather than being a silent passthrough you'd never notice.

Under the hood it's a standard VAE decode (latent space β†’ pixel space), with an optional tiled decode via tile_size (0–4096, default 0 = off). If you're decoding a big latent and blowing your VRAM budget, set a tile size - same tradeoff as the core "VAE Decode (Tiled)" node: a bit slower and slightly lower fidelity at the seams, in exchange for staying inside your memory limit.

The MASK output is worth knowing about: ComfyUI latents from inpainting workflows can carry a noise_mask tagging which region was actually being denoised. This node surfaces that as a MASK output alongside the decoded image, saving you a separate extraction step if you're chaining into more masked work downstream.

Inputs and outputs

Required: latent (LATENT), vae (VAE), tile_size (INT, 0–4096, default 0). There's also an optional image input exposed as a dropdown - most workflows can leave it alone. Outputs: IMAGE, MASK, width (INT), height (INT).

Installing it

Via ComfyUI Manager, search "ComfyUI Essentials". Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials

Restart. As with the rest of this pack, it's in maintenance-only mode since April 2025 - stable, but don't expect active feature work.

Common issues & troubleshooting

Nothing shows up in the preview panel. Since this is an output node, it needs to actually execute - if it's muted, bypassed, or the queue never reaches it, you'll get nothing, same as any Preview/Save node. Make sure the node itself is actually in the run path.

Runs out of VRAM on a big batch. Set tile_size to something like 512 instead of leaving it at 0. That's the whole point of the setting.

Width/height don't match what you expected. These are the decoded pixel dimensions - latent height and width times 8 for a standard SD-family VAE, not the latent tensor's own H/W. If you were expecting the latent's raw size, you're reading the wrong output.

Categoryessentials/image utils

Inputs (4)

NameTypeDefaultDescription
latentLATENTβ€”
vaeVAEβ€”
tile_sizeINT00–4096β€”
imageoptCOMBO1 options: none

Outputs (4)

NameTypeDescription
IMAGEIMAGEβ€”
MASKMASKβ€”
widthINTβ€”
heightINTβ€”