JDCN_BatchLatentLoadFromList
Re-open your saved latents from a path list, a page at a time
- Latents
- LatentNames
- LatentPaths
- Index
JDCN_BatchLatentLoadFromList is the paged sibling of JDCN_BatchLatentLoadFromDir: same idea - reload latents saved by this pack to skip re-encoding - but instead of pointing at a folder, it takes a list of paths and loads them in batches. If you're processing a big latent library a few files at a time across multiple queue runs, this is the node.
How it works
Four inputs, mirroring the image-list loader:
PathList- the latent paths to load from (list-input).Index- which batch to load, 1-based. It's a page number, not an element offset. WithBatchSize = 2over a 4-item list,Index = 1returns items 1β2,Index = 2returns 3β4. The pack's docs spell this out explicitly with an a/b/c/d example - it's the single most misunderstood thing in these list loaders.BatchSize- items per batch.BatchDirection-TOPTOBOTTOM,BOTTOMTOTOP, orRANDOM(random sample ofBatchSizefrom the list).
Outputs: Latents (the loaded tensors), LatentNames, LatentPaths (for just this batch), and Index echoed back.
How to use it
The natural pipeline: JDCN_AnyFileList (filter tensors / .latent) β PathList β this node β sampler. Bump Index per run to chew through the library a page at a time. Or chain it after JDCN_AnyFileSelector if you want to hand-pick a specific latent rather than paging. RANDOM is nice for grabbing a random page of latents for variation runs.
Only .latent files written by JDCN_BatchSaveLatent are guaranteed to load correctly - the format is this pack's own save_torch_file layout. Don't point it at arbitrary checkpoint or diffuser latents and expect clean results.
Installing it
Part of ComfyUI-JDCN:
- ComfyUI Manager β Install Custom Node β search JDCN β install ComfyUI-JDCN β restart.
- Or:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-JDCN.git
cd ComfyUI-JDCN
pip install -r requirements.txt
Restart; under π΅ JDCN π΅. Only dependency is piexif, no models.
Common issues
Same empty-batch-when-past-the-end behavior as the image version - Index beyond the list returns nothing, not an error, so if you see empty latents, check your page number. BatchSize = 0 selects nothing meaningful. And the usual VAE rule applies on decode: the checkpoint you sample with needs to match what produced the latents, or colors will be off. Verify one page loads and decodes correctly before running the whole library.
One more: because the node reads from a list, make sure the list is actually full paths with directory prefixes. A list of bare filenames will fail to resolve - the PathList from JDCN_AnyFileList is already correct, which is why that pairing is the smoothest path.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| PathList | STRING | β | |
| Index | INT | 11β9999 | β |
| BatchSize | INT | 50β9999 | β |
| BatchDirection | COMBO | 3 options: TOPTOBOTTOM, BOTTOMTOTOP, RANDOM |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| Latents | LATENT | β |
| LatentNames | STRING | β |
| LatentPaths | STRING | β |
| Index | INT | β |