Latent Loader
Reload a saved .latent file, old format or new
- LATENT
Latent Loader reads a previously saved latent tensor back off disk - a .latent or .safetensors file sitting in your ComfyUI output directory - and hands it back out as a LATENT you can feed straight into a sampler, a decode step, or further latent-space work. Pick the file from a dropdown, get the tensor back. No re-encoding, no re-sampling.
Why you'd want to reload a latent instead of a seed
The obvious use is exact reproducibility. A fixed seed gets you close to the same starting noise, but it's not identical across every ComfyUI version, sampler implementation, or even minor code change - a saved latent is identical, byte for byte. If you're running an XYZ-style comparison (this pack's whole reason for existing, per its own README) and want the checkpoint or sampler to be the only variable that changes across a grid, loading the same saved latent for every run controls for the one thing a seed alone can't fully guarantee: the exact starting noise.
It's also just a practical way to resume work - decode a saved latent again later with a different VAE, or pick back up a partial pipeline without re-running the sampling step that produced it, which can be the expensive part.
What makes this one worth having over just any latent loader
Two things called out directly in how it's built. First, it auto-detects and handles both the newer JSON-wrapped format (which supports float32 tensors) and the older legacy binary formats (pickle, torch, safetensors) - so it doesn't matter whether the file you're loading came from an old workflow or a current one, it reads either. Second, it broadcasts missing dimensions to guarantee a proper 4D tensor shape on the way out, which quietly saves you from a shape-mismatch error if the saved file's dimensionality doesn't line up exactly with what a downstream sampler expects. It also logs the loaded tensor's stats - shape, min, max, mean - which is genuinely useful when you're debugging why a reloaded latent behaves differently than you expected; check the console output rather than guessing.
The input and output
latent_file(required) - a dropdown of files ComfyUI finds in youroutputdirectory. If none exist yet, this shows[No latents found in output].- Output is a single
LATENT, ready to feed a sampler or a VAE decode.
How to install it
ComfyUI Manager: search DemonAlone-nodes-ComfyUI, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/DemonAlone/DemonAlone-nodes-ComfyUI
then restart. No extra dependencies or models - it reads whatever's already saved on disk.
Common issues & troubleshooting
The dropdown just says "No latents found in output." You need a Save Latent node (or equivalent) run at least once first - this node only lists files that already exist. It doesn't generate a latent itself.
Old file loads but the shape looks off. This is exactly the broadcasting behavior mentioned above doing its job - check the console log this node emits (shape, min, max, mean) to confirm the loaded tensor actually looks sane before you assume something's broken downstream.
Reloaded latent decodes differently than the original run. The latent itself is identical if it loaded correctly, so the divergence is almost always downstream: a different VAE, a different denoise value on a re-sample, or a ComfyUI version change affecting the sampler math - not this node silently corrupting the tensor.
File format is unclear (old workflow, unknown origin). That's specifically what this node is for - it doesn't require you to know in advance whether you're loading a modern JSON-wrapped .latent or a legacy pickle/torch save; it detects and parses either.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_file | COMBO | 1 options: [No latents found in output] |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |