Save Latent
Save your work mid-pipeline so you never re-run the slow part
- samples
- samples
Most people never touch this node, and most people also re-run the slow half of their workflow over and over. SaveLatent dumps the latent to disk so you can pick the pipeline back up later without regenerating it. Think of it as a save point for the diffusion part of the graph.
What it saves and where
You feed it a LATENT - typically the output of a KSampler or a VAEEncode - and it writes a .latent file (a safetensors container) into your output folder. The filename_prefix defaults to latents/ComfyUI, which lands files at output/latents/ComfyUI_00001_.latent and keeps counting up. It also embeds the workflow prompt metadata, so a .latent you share with someone else brings the generation info along - it's the latent equivalent of sharing a PNG with embedded workflow.
To get the file back into a graph, you use LoadLatent. There's no need to encode anything again; the latent goes straight back to where a sampler would output it, so you can continue from mid-pipeline. The old-format scaling (the 1/0.18215 multiplier SD 1.5-era latent sharing used) is handled automatically based on a version flag inside the file.
When it's genuinely useful
- Expensive first passes. If you've got a pipeline where pass one takes minutes and you're endlessly tuning pass two, save the pass-one latent and iterate on the cheap half.
- Sharing the pre-sampled state. Posting a
.latentplus a workflow lets someone skip straight past generation and see what your sampling stage actually did. - Caching an encode. Encoding a big image, saving it, then reusing it across experiments beats re-encoding every time.
One structural thing: this is an output node - a terminal in the graph. You can still read the samples output off it if you want to keep feeding the graph, but its purpose is to be the end of a branch. And note the file format is the .latent container, not an image: you can't preview these files, and LoadLatent only lists .latent files in the input folder (drag one in to get it there).
Common issues
The usual confusion is expecting to see an image. You won't - it's a tensor on disk, and the only way to look at it is to decode it. Second gotcha: a latent saved at one resolution or from one model's latent space is not portable to another. A HunyuanVideo latent won't make sense fed into an SDXL sampler, so keep .latent files tied to the model that made them. Otherwise it's about the least glamorous, most reliable node in the whole list - wire it in, walk away, come back and continue.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | — | |
| filename_prefix | STRING | latents/ComfyUI | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |