Nodes/comfyui-previewlatent/Preview Latent (Advanced)
ComfyUI Node

Preview Latent (Advanced)

The Preview Latent That Actually Knows What Model You're Running

By martijnat·Created 3 years ago·Updated 11 months ago· 47
Preview Latent (Advanced)
  • latent
  • latent
base_model
preview_method

PreviewLatentAdvanced is the master node of the comfyui-previewlatent pack, and it exists because of a boring but crucial fact: a latent isn't just a blob of numbers, it's a blob of numbers scaled for a specific model's latent space. SD1.5, SDXL, Flux, Wan, LTXV - they all store their compressed representations differently, and if you decode with the wrong scale factor, you get a preview that's too dark, too washed out, or just plain wrong.

The basic PreviewLatent node hardcodes the SD1.5 format, which is fine for most workflows and quietly wrong for everything else. PreviewLatentAdvanced is the one you reach for when you're working with something modern, or when you want to pick your preview decoder instead of taking whatever auto gives you. Same idea as the rest of the pack: skip the expensive VAE, get a fast full-resolution peek at your latent, pass the latent through untouched. It saves a temporary PNG with full workflow metadata (right-click → "Save Image" keeps the graph), same as the simpler siblings.

The inputs that matter

Only two inputs aren't the latent itself:

  • latent (LATENT) - the latent you want to look at.
  • base_model (enum) - one of SD15, SDXL, SD3, Flux, Wan21, Wan22, LTXV. This picks the correct latent format (scale factor) for decoding. This is the input the basic nodes hardcode; here you're in charge. Pick the model family your latent actually came from.
  • preview_method (enum) - auto, taesd, or latent2rgb. auto uses a TAESD decoder if one is installed in models/vae_approx/, otherwise falls back to latent2rgb. Force taesd for the slightly-prettier tiny decoder, or latent2rgb when you want raw speed - on some machines TAESD is actually slower than the full VAE, so don't assume.

There's one output, latent (LATENT), and it's the same latent that went in - the node is an output node that also happens to forward its input, so you can chain it mid-graph like a reroute.

When it's worth using

If you're on SD1.5 or SDXL and just want a quick preview, the convenience variants (PreviewLatent, PreviewLatentXL) do the same thing with one less dropdown. PreviewLatentAdvanced pays off in three situations: you're mixing architectures in one workflow (say, a Flux refiner after an SDXL pass), you're doing video latents (Wan, LTXV) where the latent is a 5D tensor and the node flattens frames for you, or you want explicit control over which decoder runs. It's also genuinely handy as a diagnostic - when your previews look wrong, being able to swap base_model and preview_method in place tells you fast whether it's a scale-factor mismatch or a decoder artifact.

Installing and gotchas

Same as the rest of the pack: ComfyUI Manager (search "comfyui-previewlatent"), or clone https://github.com/martijnat/comfyui-previewlatent into ComfyUI/custom_nodes/ and restart. No requirements.txt, no extra dependencies - it runs on ComfyUI's built-in latent_preview and latent_formats modules. That's also the main gotcha: those modules have gained new classes over time (Wan21, Wan22, LTXV), and the pack imports them at module load. If your ComfyUI is ancient, the whole pack refuses to import. Update ComfyUI before you blame this node.

One more thing worth knowing: the enum list is the pack author's snapshot of the ecosystem, not a guarantee your local ComfyUI knows every one of those latent formats. If you pick a base_model your ComfyUI build doesn't support, the error message will point at the latent format, not the node - so check the ComfyUI version first.

Categorylatent

Inputs (3)

NameTypeDefaultDescription
latentLATENT
base_modelCOMBO7 options: SD15, SDXL, SD3, Flux, Wan21, Wan22, +1
preview_methodCOMBO3 options: auto, taesd, latent2rgb

Outputs (1)

NameTypeDescription
latentLATENT