萌宝AI·提示词整理器
One node, eight jobs, and the widget that picks which
- selected_prompt
- results_json
- titles_text
- status
Everyone has a text file of prompts. The problem with the text file is that it lives outside ComfyUI, so the good prompt you wrote in March is invisible from the graph you're building in September. WANGPromptOrganizer (萌宝AI·提示词整理器) is a database for prompts that lives inside the workflow - saved by group and title, searchable, importable, exportable - and it also drives a front-end panel you'll reach for more than the node itself.
The one thing to understand first
This node is action-multiplexed. It does exactly one thing per execution, and the action widget decides which. Eight options:
save_or_update, get, search, list, delete, import_json, export_json, rename_group.
So it's not "the prompt node" - it's eight nodes wearing a trench coat. If you want to save a prompt and also search the library in the same graph, that's two organizer nodes, each with its own action set.
Inputs and outputs
All twelve inputs are widgets: action, group, title, prompt, query, tags, note, merge_mode, new_group, import_json, import_path, export_path. Which ones matter depends entirely on the action:
save_or_update- needsgroup,title,prompt, optionallytagsandnote. Same group+title updates the record in place, which is why "save" and "update" are one action.get- needsgroupandtitle. Iftitlecontains" / "it splits it into group and title first, so you can paste a fullgroup / titlelabel. Not found is an error, not a fallback:Prompt not found: group / title.search- usesquery(and optionallygroup) and returns everything matching.list- everything in a group, query ignored.delete- matches group+title case-insensitively and removes the record.import_json- takes a payload from theimport_jsonfield or a file atimport_path, then merges usingmerge_mode:update,append,skip_existingorreplace_all.export_json- writes{"version": 1, "exported_at": ..., "prompts": [...]}toexport_path. Give it a directory and it generates a timestamped filename inside it; leave it blank and it writes into the pack's user data directory. Paths are resolved on the machine running ComfyUI.rename_group- needsgroupandnew_group, and moving a whole group is one action instead of N edits.
Four outputs, all STRINGs: selected_prompt (the single most relevant prompt for the action - the one you just saved, the one you got, or the first search hit), results_json (the matching records as indented JSON with non-ASCII preserved, so Chinese prompts stay readable), titles_text (a formatted list of titles), and status (a human sentence like Imported 12 prompt(s). Created: 9. Updated: 3.). In real graphs status goes to a text display and selected_prompt goes to a generation node's prompt input - that's the whole reason get and search exist as actions.
Caching, and why it matters here
The node's cache key is the prompt store file's modification time. Good news: change a prompt in the panel and the next run picks it up without you clearing anything. Bad news: the same mechanism invalidates everything downstream of the node whenever the store changes, so a graph that felt fast can suddenly re-run its whole generation chain because you edited an unrelated prompt. If you're doing prompt-library surgery, do it with the workflow idle.
Installing it
Part of ComfyUI-MengBaoAI (Corkery520, 17 nodes, MIT, Registry id mengbaoai). Manager: search MengBaoAI, mengbaoai or 萌宝AI. CLI: comfy node install mengbaoai. Git while the Registry release clears scanning:
cd ComfyUI/custom_nodes
git clone https://github.com/Corkery520/ComfyUI-MengBaoAI.git
cd ComfyUI-MengBaoAI
python -m pip install -r requirements.txt
numpy, Pillow, requests. Prompts are stored in ComfyUI/user/mengbaoai/prompts.json - not in the workflow, not in git - and the pack migrates from the old standalone WANG_prompt_organizer_nodes plugin's data/prompts.json on first load. Disable that plugin before running this one; the README lists it among the packs that cause duplicate node IDs and routes. The old /wang_prompt_organizer/* HTTP endpoints are still served, so existing front-end integrations keep working.
Things that bite
- Local-file import/export.
import_pathandexport_pathare server-side paths, so they don't work the way people expect on a remote ComfyUI instance. Pasting JSON into the field is the portable option. geterrors where the reader falls back. If you want "use what's saved, otherwise use this text", that's WANGPromptReader's job, not this node's.- Merge modes are destructive in the wrong order.
replace_allreplaces the whole store, not the group. Export first. - It's a library, not a structured prompt builder. Grouping and tags are your only organising tools - no folders within folders, no version history beyond timestamps.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| action | COMBO | save_or_update | 8 options: save_or_update, get, search, list, delete, import_json, +2 |
| group | STRING | default | — |
| title | STRING | new prompt | — |
| prompt | STRING | — | |
| query | STRING | — | |
| tags | STRING | — | |
| note | STRING | — | |
| merge_mode | COMBO | update | 4 options: update, append, skip_existing, replace_all |
| new_group | STRING | — | |
| import_json | STRING | — | |
| import_path | STRING | — | |
| export_path | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| selected_prompt | STRING | — |
| results_json | STRING | — |
| titles_text | STRING | — |
| status | STRING | — |