With Auto save off the only way to save was a small SAVE label in the corner of the preview bar, easy to miss. A row between the bar and the picture now says "Not saved yet" and holds a solid button: Save picture, Save all 4, Save this one, Save the rest. After a save it says what is saved, with the file's name for one picture. The row shows only while the node holds pictures, takes its own room so the picture keeps its floor, and stays with the preview off. The button is primaryAction in the shared panel controls; the wording is keepWords, with a test.
7.3 KiB
Save Image
Saves an IMAGE batch as PNG, lossless WebP or lossless JPEG XL,
with the workflow embedded or deliberately left out. The name is either
composed on the node from a prefix plus the tags you switch on, or supplied
exactly by the filename input, so a caption or edit pass keeps the source
file's name. A caption on the caption_text input writes the paired .txt.
The card
- Folder (
output_dir): empty saves to ComfyUI's output folder; a name such assets/portraitssaves to that subfolder, created if missing. Save Image never writes outside the output folder: absolute paths, drive letters,~and..are refused before the run, and the path preview says so once you press Enter or click away. Browse walks the subfolders of the output folder. - Filename (
filename_prefix): the local name, subfolders allowed (sets/shot). While thefilenameinput is linked the field reads{{filename}}with a small linked tag, and the tags below go gray and cannot be clicked - an exact name is never decorated. A workflow saved with the oldexact_nameshows that name tagged exact; clear it to compose locally. Name tokens work here as in ComfyUI's own Save Image:%date:yyyy-MM-dd%is today's date,%KSampler.seed%is a setting of another node (its title or type, a dot, the setting's name), and%width%and%height%are the picture's size. A token can name a folder too:%date:yyyy-MM-dd%/shot. The list is under "Name tokens" below. - Path preview: the name this save will produce, in the order the tags
are appended:
prefix[_YYYY-MM-DD][_HH-mm-ss][_WIDTHxHEIGHT][_#####][_b###]. After a run it shows the first file actually written. - Tags: Counter (
name_counter, on by default) appends the next free five-digit number for that stem in that folder, so a save never collides. Date and Time (name_date,name_time) stamp the local clock. Size (name_size) appends1024x1536. Batch # (name_batch) appendsb001, b002...across an image batch, which then shares one counter; without it each frame takes the next number. With the counter off a single image reuses the same path and replaces the file - the dataset replacement case - and a batch still numbers its frames. - Format: PNG saves everywhere and keeps alpha. WebP
(
webp lossless) is usually smaller than PNG, keeps alpha, and carries the workflow in EXIF. JXL (jxl lossless, lossless JPEG XL) is the most compact; it needs the optionalpillow-jxl-pluginin ComfyUI's python (also the pack'sjxlextra) and few browsers preview it. - Embed workflow (
save_metadata): On stores the prompt and workflow in the file (PNG text chunks, EXIF in webp and jxl) so it drags back into ComfyUI; Off writes a clean file for sharing or datasets.--disable-metadataon the server wins. - Preview (
preview): the small switch under the card shows the saved image on the node. Off, the picture's box goes away and the node is shorter; on again, the node returns to its height with the last saved image. It is display only: the file is saved either way and the queue still lists it. When a run saves more than one image (a batch, or a list such as a folder of images), they all show side by side. The arrows beside the switch (‹ all 5 ›) go on to each one by itself (‹ 2 / 5 ›) and back round to all of them. A run of more than 48 shows one at a time. The node shows a small copy of each picture (up to 2048 pixels on the long side), so a big file shows at once on a slow connection too. The saved file is always full size. The copies are in ComfyUI's temp folder. - Auto save (
autosave, on by default): on, every run saves its pictures. Off, a run only shows them here and saves nothing. A row over the picture then says Not saved yet, with a Save picture button. With several pictures it reads Save all 4, and with the arrows on one picture, Save this one. After a save the row says what is saved. Use it to make a batch, look, and keep only the good ones. The pictures are saved under the name and folder set above, in the format picked, with the workflow inside if Embed workflow is on. They wait in ComfyUI's temp folder, which is emptied when ComfyUI restarts, so save what you want before that. - Preview steps (
step_preview, off by default): the switch left of preview shows the picture while it is being made, one step at a time, where the saved image goes, with a STOP button on the bar. Stop a run that is going wrong after the first steps instead of waiting for the end; a stopped run saves nothing and says so on the picture. Once the image is saved it replaces the steps. With several samplers, the node shows the one that feeds it. During an upscale in tiles it keeps the whole picture and says "upscaling in tiles" instead of showing each tile. Display only: the saved file is the same with it on or off. The Step Preview page has the details.
Inputs
- filename (STRING, link only): the exact name from upstream - a Load
Image name, a caption tool's id. Its image extension is swapped for the
chosen format's (
photo123.jpg->photo123.png); a batch appends_001,_002... A linked but empty value stops the run instead of saving under a made-up name. - caption_text (STRING, link only): saved as a UTF-8
.txtbeside every image with the same name (portrait.png->portrait.txt). Empty writes no sidecar. The oldcaptionbox still works underneath; a linked caption wins.
Rooted paths and .. in names typed on the node are rejected before the
run. A bad name arriving through the filename link stops the run at this
node, before any file is written. on_existing
from older workflows is still honored wherever a save can land on an
existing file (counter off, exact or linked names).
Name tokens
Type these in the Filename field. The path preview shows what they will be, apart from the size, which only a run knows.
| Token | Becomes |
|---|---|
%date:yyyy-MM-dd% |
The date and time in the form you give: yyyy year, MM month, dd day, hh hour, mm minute, ss second. |
%KSampler.seed% |
A setting of another node: the node's title or type, a dot, then the setting's name. |
%width%, %height% |
The picture's size in pixels. |
%year%, %month%, %day% |
The date of the save. |
%hour%, %minute%, %second% |
The time of the save. |
- The date and the other node's setting are filled in by the browser when you press Run. A run sent straight through the API gets only the size and time tokens, as with ComfyUI's own Save Image.
- A name that arrives on the
filenameinput is another node's exact name and is not read for tokens. - Other text between percent signs stays as typed.
Outputs
- file_path: absolute path of the first file saved this run (empty when every file was skipped), for downstream nodes that want the file itself.
- images: the input batch, unchanged — save first, keep wiring.
The node always re-runs on Queue (a saver's job is the side effect, so
deleting a file and queueing again saves it again), and a server launched
with --disable-metadata overrides the metadata toggle — the owner's call
beats the widget.