๐ฆ RS Decode Save Image
VAE Decode + Save in one node, because the chain is boring
- samples
- vae
- image
Every generated image in ComfyUI ends the same way: VAEDecode turns your latent back into pixels, then SaveImage writes it to disk. Two nodes, one wire, zero thinking - which is exactly why this pack merged them. RS Decode Save takes a LATENT and a VAE, decodes, saves, and passes the decoded image forward, all in one node. It's not a feature; it's a tidy-up. But tidy-ups earn their place when they remove a node from every single graph you build.
How it works
On execution it does what VAEDecode + SaveImage would have: decode samples with vae, write the result to your output/ folder, and hand the IMAGE tensor out the other side for preview or further processing. Because it's still a save node, it inherits the good defaults:
- Prefix with subfolders -
filename_prefixtakes paths, soproject/renderlands inoutput/project/render/. Standard ComfyUI save-path logic, nothing custom. - Format choice -
png,jpg, orwebpvia theformatdropdown. - Auto-numbering -
_00001,_00002, โฆ just like stock. - Metadata - PNGs get the full workflow embedded (drag-and-drop reconstruction still works); other formats get sidecar JSON.
- Output preserved - the decoded
imageoutput is there, so you can chain a preview or a post-process node off the same tensor that got saved. That's the one thing stock VAE Decode โ SaveImage makes awkward.
Inputs are the minimal four: samples (LATENT, from your sampler), vae (VAE), filename_prefix (default ComfyUI), and format.
Where it fits
It's for graphs where the tail is a boring mechanical step and you'd rather not dedicate two nodes to it. Batch renders especially: with a %batch_num%-style prefix you can chain it onto a batch sampler and let every frame decode and save without a trailing node pair. If you need the decoded image for something more interesting than saving - a face-fix pass, an upscale, a comparison - then a separate VAEDecode gives you more freedom. This node is the "I just want it saved" path.
Worth a small hat-tip: the changelog notes a security hardening pass specifically on this node (path-traversal prevention on the save path). For a save node that's the right instinct - it means filename prefixes are sanitized, so you're not writing files outside your output tree by accident or malice.
Common issues
- Save path unexpectedly empty - check the prefix. A
/infilename_prefixcreates a subfolder, soproject/rendermeansoutput/project/render/, notoutput/projectrender/. - JPG looks different from PNG - JPG/WebP are lossy and drop the alpha channel; that's the format, not the node. PNG is the faithful default.
- Missing workflow in JPG/WebP - those formats can't embed the full workflow the way PNG does, hence the sidecar JSON. If you share a JPG and lose the sidecar, the graph is gone.
Installing it
Part of the RaykoStudio pack. ComfyUI Manager โ search ComfyUI_RaykoStudio โ install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Raykosan/ComfyUI_RaykoStudio
Restart ComfyUI. Dependencies (pycairo, opencv-python, scipy, Pillow>=10) install via Manager; a manual clone needs pip install -r requirements.txt. Apache 2.0, tested on ComfyUI 0.15+, Python 3.10+, Torch 2.8+.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | โ | |
| vae | VAE | โ | |
| save_path | STRING | โ | |
| file_prefix | STRING | img | โ |
| format | COMBO | png | 3 options: png, jpg, webp |
| node_data | STRING | {} | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |