TK Prompt Saver
A save button disguised as a node
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- prompt
The prompts you like are the ones you'll want again in three weeks. The pipeline for keeping them is almost always "open a text file and paste" - which you do for about four days.
TK Prompt Saver makes saving a side effect of generating. It sits in your graph, takes up to six prompts and six images, and every time the workflow runs it files the ones you've enabled into TK Toolkit's shared Prompt library. No save button, no dialog. It's one of the TK/prompt nodes in TK Toolkit (anima-toolkit by 时运tk).
Inputs and outputs
Required: one widget, separator (逗号 ,, 换行, 空格, 无).
Optional sockets: prompt_1 through prompt_6 (STRING, all forced inputs, so you connect them) and image_1 through image_6 (IMAGE). The numbering pairs them - prompt_3 goes with image_3, and that image becomes the entry's thumbnail.
Output: prompt, a single STRING - the selected prompts joined with your separator. With the default comma and two channels enabled, you get the two prompts comma-joined, which is handy for feeding the same text onward.
The rest of the configuration is in the node's own UI, not in the schema: single vs multi mode, a per-channel name (提示词 1 … by default, rename them to outfit, style A, whatever), and the Prompt library category the entries land in. All of that travels with the workflow.
What happens on execution
The node is an output node, so it always runs. When it does, the enabled, non-empty channels are turned into library records - the prompt text, its display name, the category, which input it came from, and a preview image. Preview images are downscaled to a 384px JPEG before being stored, so you're not stuffing full-resolution renders into a browser database.
In multi mode each enabled channel becomes its own library entry, which is the behaviour you want: three different prompt variants from an A/B run get saved as three reusable items, not one concatenated blob. In single mode, only the chosen channel is filed.
The entries go into the shared anima-lora Prompt library - the same one the toolkit panel, the panel's image-parsing feature, and TK Prompt Cards read. That shared-container design is the useful part: parse a PNG from Civitai, click "保存到 Prompt 库", and the prompt is now available as a card in Prompt Cards for your next run. The library is kept in IndexedDB for speed and mirrored to data/prompt_library.json inside the plugin directory (with a .bak alongside), so clearing site data or updating the pack doesn't lose your collection.
When you'd actually wire it
The obvious case is iteration: you're trying variants, and the good one should not depend on you remembering to copy it. Put the prompt text nodes on prompt_1 and prompt_2, wire the same images that go to your save node into image_1 and image_2, enable both, and stop thinking about it.
The less obvious case is a prompt you're building across nodes. If a composition node assembles from lighting, character and camera pieces, feeding the assembled string in here captures the final result - not the pieces - which is what you want months later when you can't remember which lighting preset produced it.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Ararararararaki/comfyui-anima-toolkit
# restart ComfyUI
ComfyUI Manager: search TK Toolkit (anima-toolkit). Required packages are aiohttp and requests; nothing to download. Registration is under TK/prompt.
Gotchas
Empty channels are skipped, silently. That's the feature - nothing gets filed until there's text. But it also means a mis-wired channel doesn't complain; it just never appears in the library. If a prompt mysteriously isn't saved, check the wire and the channel's enable switch.
Mode matters more than it looks. Leave the node in multi mode and every enabled channel saves separately; in single mode only the selected row does. People who "lost" prompts usually had single mode on with the wrong row selected.
The library is browser-scoped. Same host and port as the panel, same browser profile. localhost versus 127.0.0.1 is a different origin with a different IndexedDB - your library will look empty if you switch. The JSON mirror in the plugin's data/ folder is the safety net, not a substitute for being consistent.
Don't treat it as a structured dataset. It's a prompt notebook with pictures. There's no tagging beyond a category, no export beyond the toolkit's own export, and no versioning. For anything you'd call a dataset, keep your own text files.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| separator | COMBO | 逗号 , | 4 options: 逗号 ,, 换行, 空格, 无 |
| prompt_1opt | STRING | — | |
| image_1opt | IMAGE | — | |
| prompt_2opt | STRING | — | |
| image_2opt | IMAGE | — | |
| prompt_3opt | STRING | — | |
| image_3opt | IMAGE | — | |
| prompt_4opt | STRING | — | |
| image_4opt | IMAGE | — | |
| prompt_5opt | STRING | — | |
| image_5opt | IMAGE | — | |
| prompt_6opt | STRING | — | |
| image_6opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |