ZF Load Single Latent
Load a saved latent from disk, no upload dialog required
- latent
- file_path
If you work with video models - WAN especially - you already know the pain this node kills. You generated a latent you want to reuse, and the only built-in way to get it back into a workflow is to drag the PNG around and hope, or fight a file-picker node. LoadLatentFromPath (display name "ZF Load Single Latent") just reads one latent file straight off disk by typing a folder and a file name. No upload, no dialogs, no messing about.
It's part of ZF-ComfyUI-Helper, a small no-dependency utility pack. The node lives under ZF Helper/Latent.
What it actually loads
The node reads a single safetensors-style latent file with one of three extensions: .latent, .safetensors, or .sft. You only give it two things:
file_name- the file name without needing the extension.001 (1)resolves to001 (1).latentautomatically, which is convenient when you're dealing with batches saved as001 (1),001 (2), etc.folder_path- the full local path to the folder. Note the default is/root/Latent, which is a Linux-root path. On Windows or a Mac you'll want to point this at your real folder; if you leave the default and the folder doesn't exist, the node's validation will complain before you even queue.
Under the hood it uses safetensors.torch.load_file, so it expects a latent_tensor key. One genuinely useful detail: if the file is an older SD1.5-style latent (no latent_format_version_0 key), the node rescales it by 1/0.18215 to match the modern latent format, so an old latent decodes correctly instead of producing garbage.
The three WAN flags
The remaining inputs - wan_has_ref, wan_drop_last, wan_looped - are metadata keys the node writes into the latent dict. They exist for WAN video sampling, where the latent carries flags about reference frames and frame dropping. If you don't know what they do, leave them alone: wan_has_ref defaults to True, the other two to False. You'll only touch them if a specific video pipeline tells you to.
What you get out
Two outputs: latent (a standard LATENT dict, ready to feed a sampler or decoder) and file_path (the resolved absolute path, handy if you want to log or display what was loaded). Because the node hashes the file for ComfyUI's change-detection, editing the latent file on disk and re-running will pick up the new content - you don't have to bypass and re-enable the node to force a reload.
Installing it
Since this is a tiny pack with zero external dependencies, install is painless:
cd ComfyUI/custom_nodes
git clone https://github.com/Z-yaofang/ZF-ComfyUI-Helper
Then restart ComfyUI. Or use ComfyUI Manager → Custom Nodes Manager → search ZF-ComfyUI-Helper → Install → restart. There are no models to download and no requirements.txt - the pack only uses torch, numpy, PIL, and safetensors, which ComfyUI already bundles.
Where the traps are
Two things get people. The first is that /root/Latent default - it's clearly the author's own machine path, and it does not exist on most setups. Change it before you queue or you'll get a validation error. The second is expecting this to be a folder scanner: it's not. You type one exact file name. If you want "load everything in this folder as a latent batch," that's the sibling node LoadLatentsFromFolderPath in the same pack.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| file_name | STRING | 001 (1) | — |
| folder_path | STRING | /root/Latent | — |
| wan_has_ref | BOOLEAN | true | — |
| wan_drop_last | BOOLEAN | false | — |
| wan_looped | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| file_path | STRING | — |