RloadNpy
Pull saved node data back out of a .npy file
- output
ComfyUI forgets everything between runs. Latents, image batches, whatever intermediate value - once the queue clears, the only way to get it back is to re-run the whole graph. Rload (displayed in the node menu as RloadNpy) is the cheap way around that: it reads a .npy file from ComfyUI's output folder and hands whatever was inside back to the graph through an output socket.
Who's this for? Any workflow where an expensive middle step shouldn't re-run every time you tweak the ending. You save a latent, an image batch, an embedding - whatever - at the end of one run using the paired ComfyUI-ResourcesSave pack, then load it in a fresh workflow with Rload and iterate on the cheap half. It's a poor-man's persistence layer, and for a node that touches no pixels it's surprisingly handy.
How it works
Two string inputs, file_path (default empty) and file_name (default ComfyUI_00001_), get concatenated and resolved against ComfyUI's output directory. So the default looks for ComfyUI/output/ComfyUI_00001_.npy. The file is loaded with numpy using allow_pickle=True, and if the first element is tensor-shaped it comes back as a torch tensor with a batch dimension added - [1, ...] - otherwise you get the raw object back. Save with ResourcesSave, load with Rload, match the filename. That's the whole trick.
Inputs and outputs that matter
Honestly, just the two strings:
- file_path - default empty. Use it for a subfolder, or to override where the file lives.
- file_name - the prefix the save side used. If you saved as
mybatch_00001_.npy, typemybatch_00001_here.
The output is typed * (any), so wire it into whatever matches what you saved - a PreviewAny to check it, or straight into the node that wants the tensor.
Install
Standard, and light: no requirements.txt, no model downloads. The pack only uses ComfyUI's own helpers plus numpy/torch/PIL, which you already have.
Via ComfyUI Manager, search ComfyUI-ResourcesLoad and install, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MrFrankHobbidy/ComfyUI-ResourcesLoad
Then restart ComfyUI.
Where people get burned
The file has to actually be there. Misspell the prefix, or let the save side land on a different counter, and you get a FileNotFoundError - the README doesn't spell any of this out, so it's the first thing you'll hit.
Two quieter gotchas worth knowing. First, Rload doesn't declare IS_CHANGED, so ComfyUI may cache its result: overwrite the .npy with the same name, hit Run with nothing else changed, and you can get served the stale value from the last run. Toggle a widget or restart to force a fresh load. Second, allow_pickle=True is a real security smell - a .npy can carry executable pickles. Only load files you (or the save pack) wrote yourself, not ones a stranger handed you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | — | |
| file_name | STRING | ComfyUI_00001_ | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |