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

Preview Latent (SDXL)

Stop Guessing What Your SDXL Latent Looks Like

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

The comfyui-previewlatent pack started with a simple bug-you'll-hit-if-you-don't: the basic PreviewLatent node is hardcoded for SD1.5, so when you feed it an SDXL latent you get a preview with the wrong scale factor - colors off, contrast weird, nothing like what the VAE will eventually produce. PreviewLatentXL is the one-parameter fix, the SDXL edition of the same node.

It's a thin wrapper around PreviewLatentAdvanced with base_model locked to SDXL. You feed it a latent, it runs a cheap preview decode (TAESD if you have a decoder in models/vae_approx/, otherwise latent2rgb), shows you a full-resolution look at what's in the pipeline, and passes the latent straight through. No VAE decode, no seconds of waiting, no VRAM spike. The output is the same latent you put in, so it slots into the middle of a workflow like a reroute node and doubles as a fast "Preview Image" for quick testing.

Inputs and output

  • latent (LATENT) - your SDXL latent, typically from a KSampler or VAE Encode.

Output: latent (LATENT), unchanged. It's an output node, so right-click the preview → "Save Image" stores the full workflow in the PNG metadata.

Two things worth knowing. First, the preview quality is intentionally rough - latent2rgb is a crude mapping, so judge composition here, not fine detail. Second, if you're on the full SDXL workflow (base + refiner) or you're doing SD1.5, you're covered elsewhere in the pack: PreviewLatent handles SD1.5, and PreviewLatentAdvanced gives you the model dropdown plus a choice of decoder if you want to dig deeper.

Installing

One install gets you all five nodes. ComfyUI Manager (search "comfyui-previewlatent"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/martijnat/comfyui-previewlatent

Restart ComfyUI. No extra dependencies beyond what ComfyUI ships - the pack has no requirements.txt. If it fails to load on an old ComfyUI, that's the pack importing latent_formats classes (Flux, Wan, LTXV) your build doesn't have yet; update ComfyUI first.

Categorylatent

Inputs (1)

NameTypeDefaultDescription
latentLATENT

Outputs (1)

NameTypeDescription
latentLATENT