Shima File Saver
The save node that embeds your whole workflow in the file
- images
- shima.commonparams
- full_path
- folder_path
- filename
- collision_id
- timestamp
- image
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 ofoutput_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, orskip.collision_idis the safe default;skipis 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.
Inputs (29)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Image to save. | |
| show_preview | BOOLEAN | false | Display image preview below the node options. |
| saver_enabled | BOOLEAN | true | Master on/off switch. If off, node acts as passthrough (no save). |
| export_image | COMBO | Unprocessed | Label for the image type being saved. Affects filename and metadata. |
| user_notes | STRING | Optional notes stored in file metadata. Leave blank to skip. | |
| export_with_metadata | BOOLEAN | true | Embed metadata (timestamp, project, prompts, model, etc.) in file. |
| export_with_workflow | BOOLEAN | true | Embed full ComfyUI workflow JSON in file (PNG/WebP only). |
| export_as | COMBO | PNG | Output format. PNG is lossless, JPEG/WebP use quality setting. |
| export_quality | INT | 951–100 | Quality for JPEG/WebP (1-100). Ignored for PNG. |
| overwrite_mode | COMBO | collision_id | How to handle existing files: collision_id (unique), increment, overwrite, or skip. |
| base_folder | STRING | output | Base output folder (relative to ComfyUI root or absolute path). |
| project_name | STRING | project | Project Name / Folder - used as subfolder and in filename. |
| base_name | STRING | User-supplied base filename. Leave blank to omit. | |
| collision_id_enabled | BOOLEAN | true | Add 6-char random ID to prevent overwrites. |
| collision_id_mode | COMBO | new_each_run | new_each_run = unique files; fixed = same ID across runs. |
| timestamp_enabled | BOOLEAN | true | Add timestamp to filename. |
| timestamp_format | STRING | %Y%m%d_%H%M%S | Python strftime format (e.g., %Y%m%d_%H%M%S). |
| prefix | STRING | Text to prepend to filename. Skip if blank. | |
| suffix | STRING | Text to append before extension. Skip if blank. | |
| filename_order | COMBO | PRE,PRJ,BN,ET,SUF,TS,CID | Order of filename components. PRE=Prefix, PRJ=Project, BN=BaseName, ET=ExportType, SUF=Suffix, TS=Timestamp, CID=CollisionID. |
| separator | COMBO | _ | Character between filename parts. |
| shima.commonparamsopt | DICT | Configuration bundle from Shima.Commons (overrides settings). | |
| external_projectopt | STRING | Override project name from external source. | |
| external_folderopt | STRING | Override base folder from external source. | |
| external_collision_idopt | STRING | Use specific collision ID (for matched outputs). | |
| subfolder_pathopt | STRING | Optional subfolder path (useful for batch mirroring). | |
| use_commonparamsopt | BOOLEAN | true | If True, use settings from Shima.Commons bundle (Project, Folder, etc.) |
| allow_external_linkingopt | BOOLEAN | false | If ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex) |
| show_used_valuesopt | BOOLEAN | false | Show actual values being used (debug) |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| full_path | STRING | Complete path including folder and filename with extension. |
| folder_path | STRING | Folder path only. |
| filename | STRING | Filename with extension. |
| collision_id | STRING | The collision ID used (for matching related outputs). |
| timestamp | STRING | The timestamp used. |
| image | IMAGE | Passthrough of input image. |