Nodes/Shima/Shima File Saver
ComfyUI Node

Shima File Saver

The save node that embeds your whole workflow in the file

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima File Saver
  • images
  • shima.commonparams
  • full_path
  • folder_path
  • filename
  • collision_id
  • timestamp
  • image
show_previewfalse
saver_enabledtrue
export_imageUnprocessed
user_notes
export_with_metadatatrue
export_with_workflowtrue
export_asPNG
export_quality95
overwrite_modecollision_id
base_folderoutput
project_nameproject
base_name
collision_id_enabledtrue
collision_id_modenew_each_run
timestamp_enabledtrue
timestamp_format%Y%m%d_%H%M%S
prefix
suffix
filename_orderPRE,PRJ,BN,ET,SUF,TS,CID
separator_
external_project
external_folder
external_collision_id
subfolder_path
use_commonparamstrue
allow_external_linkingfalse
show_used_valuesfalse

Stock ComfyUI's Save Image gets the job done, but it buries your output in output/ with a name nobody can find later. Shima.FileSaver is the "do it properly" version: it saves with the same organized naming as the FileNamer - project folder, timestamp, collision ID - and, importantly, it embeds the full workflow JSON and a metadata block right into the file. In this ecosystem that's not a luxury, it's the difference between a PNG and a project file (see the image-io-metadata doc: the graph lives in the PNG's text chunks, and a workflow you can drag back onto the canvas travels with the picture).

The mechanism: it takes your image, builds a name from the same components as FileNamer (base_folder, project_name, base_name, timestamp, collision ID, prefix/suffix, filename_order presets, separator), writes the file to disk, and stuffs the metadata into it using PIL's PNG text chunks. It also has a master saver_enabled switch - flip it off and the node becomes a pure passthrough, which is a great way to test a pipeline without committing files to disk.

Inputs, focusing on what a beginner actually sets:

  • images (IMAGE) - the image to save.
  • export_as (PNG / JPEG / WebP, default PNG) with export_quality (1–100, default 95, used for JPEG/WebP only). PNG is lossless; JPEG and WebP are not, and WebP/JPEG also can't carry the full ComfyUI workflow graph the way PNG does.
  • export_image - a label for what you're saving (Unprocessed, Processed, Lineart, Depth Map, Normal, Palette...). It goes into the filename and metadata, so a multi-pass pipeline produces self-describing files instead of output_0042.
  • export_with_metadata and export_with_workflow (both default on) - the metadata block (timestamp, project, prompts, model) and the full workflow JSON. Leave them on; this is the "the file is the project" feature.
  • overwrite_mode - collision_id (unique files), increment, overwrite, or skip. collision_id is the safe default; skip is handy for idempotent batch runs.
  • user_notes - freeform notes embedded in the file's metadata.
  • show_preview - render the image under the node for a quick look.

Optional inputs worth knowing: shima.commonparams (a config bundle from the Shima.Commons controller that overrides project/folder settings), the external_* overrides, and subfolder_path for batch mirroring.

Outputs: the paths back out - full_path, folder_path, filename, collision_id, timestamp - plus an image passthrough, so you can keep a pipeline alive after the save instead of ending it there.

Where people get burned: saving to JPEG or WebP and then trying to drag the file back into ComfyUI to recover the workflow. It isn't there - the graph chunk is a PNG thing, and re-encoding drops it on the floor. Keep your master copy as PNG; export lossy formats only as delivery copies. And if you're getting unexpected duplicates, your collision ID is doing its job - that's the point, not a bug.

Install via ComfyUI Manager (search "Shima") or

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf

then restart. No models to download.

CategoryShima/Output

Inputs (29)

NameTypeDefaultDescription
imagesIMAGEImage to save.
show_previewBOOLEANfalseDisplay image preview below the node options.
saver_enabledBOOLEANtrueMaster on/off switch. If off, node acts as passthrough (no save).
export_imageCOMBOUnprocessedLabel for the image type being saved. Affects filename and metadata.
user_notesSTRINGOptional notes stored in file metadata. Leave blank to skip.
export_with_metadataBOOLEANtrueEmbed metadata (timestamp, project, prompts, model, etc.) in file.
export_with_workflowBOOLEANtrueEmbed full ComfyUI workflow JSON in file (PNG/WebP only).
export_asCOMBOPNGOutput format. PNG is lossless, JPEG/WebP use quality setting.
export_qualityINT951–100Quality for JPEG/WebP (1-100). Ignored for PNG.
overwrite_modeCOMBOcollision_idHow to handle existing files: collision_id (unique), increment, overwrite, or skip.
base_folderSTRINGoutputBase output folder (relative to ComfyUI root or absolute path).
project_nameSTRINGprojectProject Name / Folder - used as subfolder and in filename.
base_nameSTRINGUser-supplied base filename. Leave blank to omit.
collision_id_enabledBOOLEANtrueAdd 6-char random ID to prevent overwrites.
collision_id_modeCOMBOnew_each_runnew_each_run = unique files; fixed = same ID across runs.
timestamp_enabledBOOLEANtrueAdd timestamp to filename.
timestamp_formatSTRING%Y%m%d_%H%M%SPython strftime format (e.g., %Y%m%d_%H%M%S).
prefixSTRINGText to prepend to filename. Skip if blank.
suffixSTRINGText to append before extension. Skip if blank.
filename_orderCOMBOPRE,PRJ,BN,ET,SUF,TS,CIDOrder of filename components. PRE=Prefix, PRJ=Project, BN=BaseName, ET=ExportType, SUF=Suffix, TS=Timestamp, CID=CollisionID.
separatorCOMBO_Character between filename parts.
shima.commonparamsoptDICTConfiguration bundle from Shima.Commons (overrides settings).
external_projectoptSTRINGOverride project name from external source.
external_folderoptSTRINGOverride base folder from external source.
external_collision_idoptSTRINGUse specific collision ID (for matched outputs).
subfolder_pathoptSTRINGOptional subfolder path (useful for batch mirroring).
use_commonparamsoptBOOLEANtrueIf True, use settings from Shima.Commons bundle (Project, Folder, etc.)
allow_external_linkingoptBOOLEANfalseIf ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex)
show_used_valuesoptBOOLEANfalseShow actual values being used (debug)

Outputs (6)

NameTypeDescription
full_pathSTRINGComplete path including folder and filename with extension.
folder_pathSTRINGFolder path only.
filenameSTRINGFilename with extension.
collision_idSTRINGThe collision ID used (for matching related outputs).
timestampSTRINGThe timestamp used.
imageIMAGEPassthrough of input image.