⚡ Save & Overwrite Image
Save to the same filename every run — yes, clobbering on purpose
- image
Stock ComfyUI's Save Image node refuses to overwrite. Give it a filename and it quietly appends _00001_, _00002_, and so on until it finds a name that doesn't exist yet. That's sensible behavior for normal saving - but it's a wall if your workflow genuinely needs one fixed file on disk that gets replaced every run.
⚡ Save & Overwrite Image is the node that knocks that wall down. It writes your image to the output directory under the exact filename you give it, and if a file with that name is already there, it replaces it. No renaming, no numbered suffixes, no warning.
Why you'd reach for it
The classic use is a feedback loop. You generate an image, save it as image.png, then load that same image.png back as the input for the next pass (the pack even ships LoadImageFromOutputDirectoryNode for exactly this - see that article). Iterative refinement, img2img chains, style-sweep workflows - anything where a downstream step re-reads a file by name needs a predictable path.
It's also handy when something outside ComfyUI is watching your output folder - an image viewer, an API, a Discord bot - and you want the "latest" file to always be at a fixed name rather than in a growing pile of _00001_ files.
What it takes and gives
Two inputs, and that's it:
image(IMAGE) - the tensor to save. The node takes the first image in the batch, converts it to PIL, and writes it. Feed it a single image and you're fine.filename(STRING, default"image.png") - the exact name used in ComfyUI's output directory. There's no path traversal to worry about; it always lands in the output folder.
No outputs. It's an output node - it terminates a branch, and the preview thumbnail shows up in the node like any save node.
The honest warnings
This node is a footgun by design, so treat it accordingly:
- It silently overwrites. There is no confirmation, no backup, no "are you sure." If you point it at a filename you care about, the previous file is gone. Use a dedicated filename for loops and don't point it at something precious.
- First frame only. Give it a batch of 10 images and you get one PNG - frame 0. If you want per-frame files, this isn't your node.
- No auto-uniquify, ever. That's the point, but it means two concurrent runs of the same workflow race over the same file.
If you want a save node with options, use the built-in Save Image or the VHS one. If you want a deterministic, always-the-same-file sink, this is it.
Install
It's part of ComfyUI-Pronodes (MIT), a small utility pack by the same dev behind the ComfyUI TensorRT speed packs:
- ComfyUI Manager: search "ComfyUI-Pronodes", install, restart.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/yuvraj108c/ComfyUI-Pronodes
No heavy dependencies for this node - it only needs PIL, which ComfyUI already has. Note the pack is still marked "in development," so it's lightweight and unpolished in places, but this particular node is simple enough that there's not much to go wrong.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| filename | STRING | image.png | — |
Outputs (0)
No outputs