💾 TOO Smart Image Saver
A Save Node That Puts Civitai's Model Auto-Link Back On Your Uploads
- images
- metadata
- workflow
- images
- filepath
Here's a ComfyUI quirk that surprises people who post to Civitai: the default SaveImage node writes the workflow graph into the PNG, but it does not write the flat A1111-style parameters string - the one Civitai's uploader scans to auto-link the checkpoint and LoRAs by hash. So your uploads on Civitai show up with the model blank. TOO Smart Image Saver is the fix: it writes both the ComfyUI workflow and an A1111-compatible parameters block, plus filenames you actually control. It's the "swap out your save node" move, in one node.
How it works
The node builds a filename from parts - prefix, extra1, extra2, model, suffix - joined by a separator, all supporting date tokens (YYYY, MM, DD, HH, mm, ss, timestamp). It writes into ComfyUI/output/<output_folder>/ (the default output_folder is YYYY-MM-DD, so you get date-bucketed folders for free). Then it saves and stuffs metadata in:
- PNG → A1111
parametersas a text chunk, plus the ComfyUIprompt/workflowchunks. - WebP/JPEG → A1111 params in the EXIF
UserComment, workflow inMake/Modeltags.
The metadata input (METADATA, typically from TOO's Image Metadata editor) supplies the positive/negative prompt, seed, steps, cfg, sampler, model name and Model hash, and Lora hashes - which is exactly the shape Civitai parses. If you leave it unwired, it writes the workflow and skips the A1111 block.
The inputs you'll actually set
There are a lot of widgets, but the ones that matter:
images- required, what you're saving.output_folderandprefix- the filename skeleton. Default prefixComfyUI_YYYY-MM-DD_HHmmssis fine; most people just add amodeland asuffix.model- a plain string. You type the model name (or a path); the node strips the directory and extension and uses the clean basename. Hand-typed, not auto-extracted - the sibling Advanced saver does the auto-extraction from the graph.output_format(defaultwebp),quality(default 97),webp_lossless- the format knobs.save_metadataandembed_workflow- both on by default; flip them off for a stripped file.- Optional
metadataandworkflowinputs to inject A1111 data or override the embedded graph.
Outputs: images (pass-through - you can keep processing after saving) and filepath, the path of the first saved file.
Install
Same as the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/tetsuoo-online/Comfyui-TOO-Pack
restart, or install via ComfyUI Manager by searching "Comfyui-TOO-Pack". Dependencies are torch, numpy, Pillow and piexif; nothing extra to download.
Common issues
- The README doesn't match the node. The README's "Smart Image Saver" section describes fields like
seed_node_name/model_node_namethat target nodes by class or#ID- the shippedTOOSmartImageSaverdoesn't have those widgets. That's the Advanced saver's job. On this node the filename comes fromprefix/extra1/extra2/model/suffix. If the README confuses you, trust the node's own widgets. - JPEG metadata goes missing for big workflows. EXIF has a 64KB ceiling; the node hits it, drops the workflow, keeps the A1111 params, and logs a warning. Save PNG if you want the whole graph to survive - it's also the only format that round-trips a full workflow anyway.
webp_losslessignoresquality- lossless is lossless, and the files get heavier. It's a deliberate trade, not a bug.--disable-metadata(or the "Disable saving prompt metadata" server setting) turns metadata writing off globally; this node respects it, so don't hunt for a bug if you've set that flag.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Images à sauvegarder | |
| output_folder | STRING | YYYY-MM-DD | Dossier de destination. Supporte YYYY, YY, MM, DD, HH, mm, ss, timestamp. Ex: YYYY-MM-DD ou projects/test |
| prefix | STRING | ComfyUI_YYYY-MM-DD_HHmmss | Préfixe du nom. Supporte YYYY, YY, MM, DD, HH, mm, ss, timestamp. Ex: render_YYYYMMDD |
| extra1 | STRING | Extra data. Supporte YYYY, YY, MM, DD, HH, mm, ss, timestamp. Ex: seed_YYYYMMDD | |
| extra2 | STRING | Extra data. Supporte YYYY, YY, MM, DD, HH, mm, ss, timestamp. Ex: denoise_YYYYMMDD | |
| model | STRING | Model name with relative path. Clean name will be extracted without the extension | |
| suffix | STRING | Suffixe du nom. Supporte YYYY, YY, MM, DD, HH, mm, ss, timestamp. Ex: _final ou _HHmmss | |
| output_format | COMBO | webp | Format de l'image sauvegardée |
| webp_lossless | BOOLEAN | false | WEBP sans perte (lossless, fichiers plus lourds). Uniquement pour WEBP. Si activé, ignore quality. |
| quality | INT | 971–100 | Qualité de compression (1-100). Pour WEBP et JPG. Ignoré si webp_lossless est activé. |
| separator | STRING | _ | Séparateur entre les éléments du nom |
| embed_workflow | BOOLEAN | true | Embarquer le workflow ComfyUI dans l'image |
| save_metadata | BOOLEAN | true | Sauvegarder les métadonnées A1111/Civitai |
| metadataopt | METADATA | Métadonnées provenant de TOO Image Metadata | |
| workflowopt | WORKFLOW | Workflow ComfyUI à embarquer (écrase le workflow courant si embed_workflow activé) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| filepath | STRING | — |