RsaveNpy
Dump any ComfyUI variable to a .npy file and stop losing intermediate state
- anything
The display name tells you everything: this node is called RsaveNpy in the UI, and what it does is save whatever you hand it as a raw NumPy .npy file on disk. "Rsave" alone is a lie in the best way - it doesn't save an image, it saves any workflow variable, from a latent tensor to a mask to a plain string.
ComfyUI is great at saving the pixels that come out of the sampler, but it has no built-in "keep this tensor for later" node. You make a gorgeous image, and the exact latent that produced it is gone the second the run ends - unless you dump it with Rsave. That's the niche this fills. It's the save half of a save/load pair: the same author ships the companion ComfyUI-ResourcesLoad pack to read the files back, so you can hand a latent, a conditioning, or a batch of images from workflow A to workflow B without re-running the first half.
How it works
Feed anything into the anything input - it's typed *, so ComfyUI accepts any socket: IMAGE, LATENT, MASK, CONDITIONING, even a string. On execution the node borrows the exact filename machinery SaveImage uses (folder_paths.get_save_image_path) and writes into your ComfyUI/output/ folder, then calls np.save(). That means the two widgets you actually set behave exactly like the ones you already know:
filename_prefix(defaultComfyUI) - a name, and it inheritsSaveImage's templating: put a/in it for a subfolder, use%date:yyyy-MM-dd%tokens if you like.filename_counter(default on) - with it on you getComfyUI_00001_.npy,_00002_, and so on. Turn it off and it writes a fixedComfyUI.npythat overwrites itself every run - handy when you only ever want "the latest dump."
It has no outputs and it's an output node, so it always fires. And don't go looking for the file in ComfyUI's image gallery - it won't be there. .npy files don't show up in the UI; find them on disk under ComfyUI/output/.
Where this actually shines
Two uses beat everything else. First, inter-workflow handoff: dump a latent you love, open the companion ResourcesLoad in a fresh workflow, and keep working from the exact same tensor. Second, debugging: sink a node you're unsure about into Rsave and inspect the result in Python with np.load("ComfyUI_00001_.npy") - you get the raw array with zero opinionated processing. That's also the honest caveat: a .npy dump has no metadata, no labels, no guardrails. You have to remember what you put in it, because nothing in the file tells you. Treat it as a data-transport and debugging tool, not an archive format - if you just want to keep the image, SaveImage already does that with far more context baked in.
Install
Via ComfyUI Manager (search ComfyUI-ResourcesSave), or:
cd ComfyUI/custom_nodes
git clone https://github.com/MrFrankHobbidy/ComfyUI-ResourcesSave
Then restart ComfyUI. There's no requirements.txt and nothing to download - the pack only uses numpy, torch, and Pillow, which ComfyUI already ships. The node lives under the ResourcesSave category.
If a dump goes missing, check output/ with a file manager rather than the UI. If a saved file won't load anywhere, you're likely pointing a non-ComfyUI tool at NumPy binary format - np.load() it in Python, or use the companion load node. And if you're drowning in .npy files, bypass the node or flip filename_counter off; it fires every run by design.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| anything | * | — | |
| filename_counter | BOOLEAN | true | — |
| filename_prefix | STRING | ComfyUI | — |
Outputs (0)
No outputs