Preview SDLI Image
A Fast Look That Keeps the Latents
- samples
- vae
The name undersells it. Preview SDLI Image isn't just "show me what this looks like" - it writes a full SDLI file into ComfyUI's temp folder, so the .webp you grab from the browser is simultaneously a preview and a container holding the exact latents that made it. If the iteration turns out to be a keeper, you haven't lost the state; you've parked it somewhere you can pick it back up.
Preview vs. Save
This is the same code as its sibling, Save SDLI Image - PreviewSdlImage is literally a subclass of it in the source. The difference is intent and destination. Preview writes to ComfyUI's temp directory with a random _temp_ filename prefix, skips the filename_prefix input entirely, and marks its files as temp in the UI. It's the "quick look during the iteration loop" node; use Save for anything you actually want to archive in output/.
What's in the file
An SDLI .webp is a RIFF container: the decoded preview image as a normal WebP chunk, plus an SDLI chunk holding the latents serialized as safetensors. You can double-click the file and it opens in any image viewer - but the payload is the latent tensor, stored lossless (as fp16) so it can be loaded back for further sampling, a different sampler pass, or an upscale-then-rediffuse run without the lossy VAE decode→encode round trip that the normal Save Image workflow forces.
Inputs
PreviewSdlImage shares almost everything with Save:
- samples (required) - the LATENT from your KSampler. It's the whole point: this format carries latents, not pixels.
- latent_type -
SD1,SDXL,SD3, orFLUX.1. Selects the TAESD fallback and tags the file metadata. - reduction_ratio -
1/1to1/8. Shrinks only the preview image, not the latents. Use1/4or1/8for a tiny embeddable thumbnail that still carries full-res latents. - quality - WebP compression quality for the preview, default 80.
- vae (optional) - your real VAE for an accurate preview. Leave it empty and the node auto-loads the matching TAESD tiny VAE from
models/vae_approx, which is fast but noticeably softer. - positive_prompt / negative_prompt (optional) - stored as metadata. If positive is empty, the node grabs the text from the first CLIPTextEncode in your graph automatically.
No outputs - it's a terminal node, so the generated WebP shows in the preview pane where you can download it via the browser.
Installing
ComfyUI Manager (search "ComfyUI SaveImage SDLI"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MitoshiroPJ/ComfyUI_save_image_sdli
Restart ComfyUI. Zero extra pip dependencies - it only uses torch, safetensors, PIL, and numpy, all bundled with ComfyUI. The one optional download is the TAESD family if you plan to preview without wiring a VAE.
Gotchas
- TAESD model missing = error on first run. If
vaeis empty, ComfyUI's built-in TAESD loader readsmodels/vae_approxand needstaesd_encoder/taesd_decoder(ortaesdxl_*,taesd3_*,taef1_*) files from madebyollin's taesd releases. Drop them intoComfyUI/models/vae_approxand the fallback stops failing. - The preview is a lossy thumbnail, not the product. Especially with the TAESD fallback - judge composition, not sharpness, and don't be surprised the WebP looks softer than the final image.
- Temp files are temporary. They live in the temp directory and get swept on restart. If a preview turns out to be the one, that's what Save SDLI Image is for.
It's a niche pack with a narrow job, but if you live in the iterate-forever loop, Preview + Save as a pair genuinely change how often you re-roll a good seed.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | The latent to be decoded. | |
| latent_type | COMBO | SDXL | 4 options: SD1, SDXL, SD3, FLUX.1 |
| reduction_ratio | COMBO | 1/1 | 4 options: 1/1, 1/2, 1/4, 1/8 |
| quality | INT | 80 | — |
| vaeopt | VAE | The VAE model used for decoding the latent. | |
| positive_promptopt | STRING | — | |
| negative_promptopt | STRING | — |
Outputs (0)
No outputs