Load Latent (Numpy)
Load a saved latent from disk, safetensor or npy
- LATENT
Passing images between two ComfyUI instances means an encode/decode round trip on both ends - VAE decode to send, VAE encode to receive. ComfyUI_NetDist's latent nodes let you skip that entirely and hand the actual latent tensor across instead. LoadLatentNumpy is the local-disk loader half of that: point it at a saved latent and it hands you back a LATENT ready to sample from.
It's genuinely flexible about the source format. The README lists three it reads: the standard safetensor .latent files ComfyUI itself already saves, plain .npy numpy files (which is what SaveLatentNumpy, this pack's own writer node, produces), and even sd_scripts .npz cache files - the latent-cache format kohya's training scripts use. That last one is a genuinely useful bridge if you're moving between a training pipeline and a NetDist-driven ComfyUI graph.
How it works
The latent field is a dropdown that populates from whatever's actually sitting in the folder ComfyUI scans for latents - the same pattern as any other file-picker node in ComfyUI. Nothing to configure beyond picking a file; the node figures out the container format (safetensor, npy, or npz) on its own.
The inputs and outputs that matter
latent(enum) - pick a file from what's available. The list is empty until there's actually something to load - runSaveLatentNumpyfirst, or manually place a.latent/.npy/.npzfile where ComfyUI expects to find one.
Output: LATENT - wire straight into your sampler or VAE decode, same as any other latent source.
How to install it
Via ComfyUI Manager: search ComfyUI_NetDist. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/city96/ComfyUI_NetDist
pip install requests
Restart ComfyUI. requests is the pack's only dependency - nothing latent- or numpy-specific to add.
Common issues & troubleshooting
Dropdown is empty. No latent files exist yet in the scanned folder. Generate one with SaveLatentNumpy, or manually drop a compatible file where ComfyUI's latent input path expects it, then restart or refresh.
Errors loading an .npz file. sd_scripts produces more than one flavor of .npz cache depending on what you're caching - this node expects a latent cache specifically, not a text-embedding cache. If it's choking on shape, double-check you pointed it at the right kind of cache file.
Loaded latent doesn't match your expected resolution. The tensor carries whatever shape it was saved at; if it came from a different aspect ratio or resolution than the rest of your current graph, downstream nodes that assume a fixed size can behave unexpectedly. Match your pipeline's resolution to the source, or resize the latent before sampling.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | COMBO | 0 options: |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |