Save Prompt (Mango)
The 'don't lose that perfect prompt again' node
You've been there: you get a genuinely great result at 2 a.m., you tweak one token "to try something," and the magic is gone and so is the exact text that made it. Save Prompt (Mango) is the anti-memory-loss node. It's an output node that dumps whatever prompt text you feed it into a plain .txt file in your ComfyUI output folder, with automatic numbering so you never overwrite the previous version. That's the whole job, and it does it well.
It pairs with Load Prompt (Mango) in the same pack, so the loop becomes: Save Prompt at the end of a run, Load Prompt later to drop that exact string back into your Prompt node. Combined with the pack's Civitai-focused metadata obsession, it fits a workflow where you treat your output folder as a searchable archive of what you actually did - not just images, but the words that made them.
How it works
The node is a plain file writer with a light touch of discipline. It writes UTF-8 text to output_folder/<subdirectory_name>/, and the filename is <filename_prefix>_<next number>.txt. The numbering logic scans the folder for existing files matching the prefix, finds the highest number, and increments - so Prompt_1.txt, Prompt_2.txt, Prompt_3.txt just keep stacking up. It writes only the prompt text; no metadata, no workflow dump. That simplicity is the feature: you can open these files in any text editor, grep them, or paste them straight back into a prompt box.
The inputs
There are exactly three, and none of them are hard:
- prompt - the multiline text you want archived. Wire this from your Prompt (Mango) node's STRING output, or any text source.
- filename_prefix - default
Prompt. The base name for the numbered files. - subdirectory_name - default
Prompts. Subfolder inside the output folder. Leave it empty to dump files directly into the output root.
It's an output node, so there are no outputs to wire - you just drop it at the end of a branch and it fires when the graph runs. One thing to note: it runs on every queue execution, so if you're doing a 20-image batch you'll get 20 files unless you gate it behind an input condition somewhere upstream. For most people saving one prompt per session, that's exactly the intended behavior.
Installing it
Save Prompt (Mango) ships in the Mango Node Pack. Install the whole pack once and you get all seventeen nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/mang01010/MangoNodePack
Restart ComfyUI after cloning. Or open ComfyUI Manager, search "Mango Node Pack," and install from there. The README lists pip install safetensors as the only extra dependency, and a stock ComfyUI already has it.
Gotchas
A few things that trip people up. First, files land in the output folder, not a folder of your choosing - if you can't find your saved prompts, look under ComfyUI/output/Prompts/. Second, the node does not create timestamped names, so a numbered file from last week and one from today are visually indistinguishable - rely on the incrementing suffix or set a meaningful filename_prefix. And third, if you clear your output folder between runs (some people do), the numbering restarts at 1, which can silently overwrite older saves elsewhere - harmless, but worth knowing. For a "set it and forget it" prompt archive, this is one of the more reliable options in the pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The prompt text to save. | |
| filename_prefix | STRING | Prompt | Base name for the saved prompt file. |
| subdirectory_name | STRING | Prompts | Subfolder (inside the output folder) to save the prompt. |
Outputs (0)
No outputs