Extensions/ComfyUI-YetAnotherSaveImage
ComfyUI Extension

ComfyUI-YetAnotherSaveImage

A minimal save image with some handy features

By boobkake22·Created about a month ago·Updated about a month ago· 0
boobkake22/ComfyUI-YetAnotherSaveImage
Nodes1
On cloudLocal install
Categoryimage
Stars0
Updatedabout a month ago
Readme

Yet Another Save Image

A small, dependency-free ComfyUI custom node for saving images with a useful filename output and the same in-node preview behavior as ComfyUI's built-in Save Image node.

Features

  • Saves png, jpg, or webp files to ComfyUI's output folder.
  • Uses quality 95 for JPG and WebP, and PNG compression level 4.
  • Shows every saved image directly on the node.
  • Outputs the saved filename as a STRING.
  • Optionally copies the exact saved file directly to ComfyUI's input folder, without recreating prefix subfolders there.
  • Updates Load Image and Load Image (Mask) filename choices after making an input copy, without refreshing unrelated node dropdowns.
  • Supports batches, prefix subfolders, and KJ-style date substitutions such as %date:yyyy-MM-dd% and %date:hhmmss%.
  • Supports normal ComfyUI search-and-replace values such as %Empty Latent Image.width% and %KSampler.seed%.
  • Automatically embeds prompt and workflow metadata in PNG, JPG, and WebP files when metadata is enabled globally in ComfyUI.

The filename output is the basename of the saved file. For an image batch, all images appear in the preview and the output contains the final batch filename, matching the filename behavior of KJNodes' Save Image node. The numeric counter has no trailing separator: for example, ComfyUI_00001.png.

Install

Clone this repository into ComfyUI/custom_nodes, then restart ComfyUI:

ComfyUI/custom_nodes/ComfyUI-YetAnotherSaveImage

There is no requirements.txt and nothing extra to install. The node only uses Python's standard library and the NumPy/Pillow runtime already provided by ComfyUI.

Node

Yet Another Save Image is available in the image category.

Inputs:

  • images: an IMAGE or image batch.
  • filename_prefix: defaults to ComfyUI; subfolders, %Node.widget%, %width%, %height%, %batch_num%, and %date:FORMAT% substitutions are supported. For example, Krea2_output_%date:yyyy-MM-dd%/%date:hhmmss%_Krea2 saves into a dated output subfolder with a time-based filename. The normal ComfyUI interface resolves dates and node-widget values before execution; direct API calls also support date, width, and height substitutions in the backend.
  • format: png, jpg, or webp.
  • save_to_input: also copy the saved file directly into the root of ComfyUI's input folder. Any subfolders from filename_prefix apply only to the output copy and are omitted from the input copy. Successfully copied filenames are added to open and subsequently created image-loader dropdowns. This targeted update does not refresh ComfyUI's separate Assets/Input library.

Output:

  • filename: the final saved file's basename, including its extension.

Workflow metadata is embedded automatically; there is no node-level toggle. ComfyUI can restore workflows directly from the PNG and WebP files. JPG files store raw workflow JSON in the standard EXIF ImageDescription field for extraction with tools such as ExifTool, although ComfyUI's current frontend does not import workflows from JPG files.