Save Image Plus (with Prompt TXT)
Save Image Plus (with Prompt TXT)
- images
SaveImagePlusPrompt (shown in ComfyUI as "Save Image Plus (with Prompt TXT)") is a standalone save node that does one extra thing over the stock SaveImage: it writes the prompt you generated with as a plain .txt file with exactly the same filename as the image, sitting right next to it. Save comfyui_0007.jpg, get comfyui_0007.txt with your prompt text inside. That's the whole pitch, and it's a surprisingly useful one once you know why the stock node leaves you hanging.
The problem it's solving. ComfyUI embeds your entire workflow into a PNG as text chunks, so drag any saved PNG back onto the canvas and the whole graph rebuilds. But that magic dies the moment you save as JPG - JPEG has no PNG text chunks, so the prompt and workflow simply evaporate (see our image-I/O notes: anything that re-encodes the image strips the metadata). JPG is what you actually want for sharing, posting, or keeping disk usage sane, and that's exactly where you lose the recipe. The author of this pack (a German fork/port of LayerUtility: SaveImagePlus V2 from ComfyUI_LayerStyle_Advance) decided the fix is a sidecar file instead of trying to hide a graph in EXIF. It's a nod to the AUTOMATIC1111 era, where the prompt lived as a flat string next to the image, not buried in a PNG.
What you actually set
The node is an output node (is_output_node), so it always runs and the graph caches backward from it - same as SaveImage. The few inputs that matter:
images- wire your final image here, like any save node.prompt_text(optional) - the text that goes into the.txt. It's aforceInputstring, meaning it's meant to be wired, not typed. The README's trick: right-click your CLIP Text Encode node → Convert widget to input →text, then wire that same socket to both the encoder and this node. One prompt, one source of truth.format-jpgorpng, withquality(10–100, default 80) anddpi(72–1200, default 300). JPG is auto-converted from RGBA to RGB.filename_prefix(defaultcomfyui) - supports subfolders (projekt/bild) and the%date/%timetokens.timestampaddsNone/ second / millisecond precision so runs don't collide.custom_path- a literal path to save outside the defaultoutput/folder; leave blank for the normal ComfyUI output dir.meta_data- embed the workflow in the PNG (PNG only, of course).save_workflow_as_jsonwrites a.jsonsidecar of the graph too.preview- default on; shows the result in the UI. If you save outside the output folder it drops a temp preview copy so the thumbnail still works.
One behavior worth knowing: it scans the target folder for existing <prefix>_<number> images and continues the highest counter, preserving digit width (_00435 → _00436). Deliberately, it ignores .txt and .json files when counting - so a missing sidecar never throws your numbering off, and an existing .txt is just overwritten stubbornly with the current prompt.
Installing
Two options, both quick - and there's no requirements.txt and no extra packages, which is blessedly rare for a custom node. Via ComfyUI Manager, search "ComfyUI_SaveImagePlusPrompt". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Slartibart23/ComfyUI_SaveImagePlusPrompt.git
Then restart ComfyUI. It'll appear under the image category.
Gotchas
The biggest one: the .txt only gets written if prompt_text is actually wired with non-empty text. Leave it unconnected and you've built a fancier SaveImage with extra steps. The prompt is not pulled from the embedded workflow automatically - wire it.
Second: since this is a fork of LayerStyle's node, if you already run ComfyUI_LayerStyle_Advance you have a near-identical LayerUtility: SaveImagePlus V2 installed. No conflict - different class names - but you don't strictly need both.
And remember the sidecar is only as good as its upkeep: it captures the prompt string, not the seed or settings. If you want full reproducibility, keep PNGs with meta_data on; use this node when you want small, shareable JPGs that don't forget what you asked for.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| custom_path | STRING | — | |
| filename_prefix | STRING | comfyui | — |
| timestamp | COMBO | 3 options: None, second, millisecond | |
| format | COMBO | 2 options: jpg, png | |
| quality | INT | 8010–100 | — |
| dpi | INT | 30072–1200 | — |
| meta_data | BOOLEAN | false | — |
| save_workflow_as_json | BOOLEAN | false | — |
| preview | BOOLEAN | true | — |
| prompt_textopt | STRING | — |
Outputs (0)
No outputs