ZF Load Latent Folders
Feed an entire latent folder into your workflow in one wire
- latent_1
- latent_2
- latent_3
- latent_4
- latent_5
- latent_6
- latent_7
- latent_8
- latent_9
- latent_10
The single-file latent loader in this pack is great until you need to process twenty latents that live in a folder. That's exactly what LoadLatentsFromFolderPath (display name "ZF Load Latent Folders") is for: it scans up to ten local folders and hands you every latent in each one as a list, ready to feed downstream in one go. If you're doing batch latent-to-video work - say, taking a folder of saved WAN latent clips and re-sampling or upscaling them all - this is the node that makes it a one-wire affair instead of twenty loader nodes.
How it works
Each of the ten address_1 through address_10 inputs is a folder path, and each has a matching latent_1 through latent_10 output. Fill in as many folders as you need; leave the rest empty. The node scans each filled folder for .latent, .safetensors, and .sft files, sorts them alphabetically, and loads every one.
Three things to know about the outputs:
- They are lists.
latent_1isn't a single latent, it's all the latents inaddress_1, in order. That's what makes this useful for batch work - and what makes it different from the single-load node. - A folder with no matching files is an error, not a silent skip. The node validates on queue and will tell you "No latent files found in folder: …" rather than quietly doing nothing.
- You need at least one real folder. If every address is blank, it raises before running.
The same three WAN flags from the single loader (wan_has_ref, wan_drop_last, wan_looped) sit at the top and apply to every latent loaded from every folder. Defaults are True/False/False; change them only if your video pipeline tells you to.
The detail that saves you time
The loader hashes every file it loads for ComfyUI's change-detection (IS_CHANGED). That means if you drop new latents into the folder or edit existing ones, the next run picks them up automatically - no bypassing nodes, no clearing the cache. Given that "I replaced a file and ComfyUI kept using the old one" is one of the classic loader gotchas, this is a genuinely thoughtful touch.
Installing it
Same deal as the whole pack - it's tiny and dependency-free:
cd ComfyUI/custom_nodes
git clone https://github.com/Z-yaofang/ZF-ComfyUI-Helper
Restart ComfyUI. Or use ComfyUI Manager → search ZF-ComfyUI-Helper → Install. No models, no requirements.txt, nothing extra to download. The node appears under ZF Helper/Latent.
Where people get burned
- The
/root/Latentdefault onaddress_1. That's the author's Linux path. On your machine, set it to a folder that actually exists or validation will fail on queue. - Confusing this with a file picker. This loads by local path, not through the browser upload dialog. If you're on a different machine or want portability, hardcoded absolute paths in a shared workflow will break for anyone who opens it. Fine for your own box; annoying to share.
- Feed a list to a node that expects one latent. A list output connects fine to list-aware nodes, but you can't just plug it into a sampler's single
latentinput. If you need per-item processing, that's what an Any Switch or a batch-splitter is for - which is the same plumbing layer this node lives in.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| wan_has_ref | BOOLEAN | true | — |
| wan_drop_last | BOOLEAN | false | — |
| wan_looped | BOOLEAN | false | — |
| address_1 | STRING | /root/Latent | — |
| address_2 | STRING | — | |
| address_3 | STRING | — | |
| address_4 | STRING | — | |
| address_5 | STRING | — | |
| address_6 | STRING | — | |
| address_7 | STRING | — | |
| address_8 | STRING | — | |
| address_9 | STRING | — | |
| address_10 | STRING | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| latent_1 | LATENT | — |
| latent_2 | LATENT | — |
| latent_3 | LATENT | — |
| latent_4 | LATENT | — |
| latent_5 | LATENT | — |
| latent_6 | LATENT | — |
| latent_7 | LATENT | — |
| latent_8 | LATENT | — |
| latent_9 | LATENT | — |
| latent_10 | LATENT | — |