Nodes/FrogUtilityTools/🐸 Library Culler
ComfyUI Node

🐸 Library Culler

Your prompt library turned into a landfill — this node does the cleanup

By RabbitThatIsPink·Created 3 months ago·Updated 3 months ago· 0
🐸 Library Culler
    • report
    name_pattern
    tag_filter
    match_modeName only
    dry_runtrue

    If you keep a prompt library in ComfyUI - a saved list of named prompts with tags, like the one in 🐸 Frog Node Pack - you know the feeling. Six months later it's a landfill. Half the entries are test prompts you don't remember making, a third reference deleted models, and the thing you're actually looking for is buried under "sd15_test_v3_FINAL(2)". The 🐸 Library Culler is the maintenance node that deletes the dead weight, one run at a time.

    This is not a generation node. It never touches a latent or a sampler, and that's the point. It's housekeeping: you set a filter, run it, and it edits your library's prompts.json on disk. It ships in FrogUtilityTools, a tiny companion pack for Frog Node Pack that works with anything storing its library at <pack>/data/prompts.json.

    How it works

    The node reads the library's prompts.json - a JSON list of entries, each with a name and a tags array - and filters it. Every entry that matches your filter is deleted; everything else is written back. The write is safe: it saves to a temp file and atomically replaces the original, and before any deletion it copies prompts.json to <pack>/Patches/Backup/prompts_BackUp.json automatically. You have to actively ignore a backup to lose data here.

    The one genuinely nice design choice: dry_run defaults to ON. Most destructive nodes make you opt into safety; this one ships safe and makes you turn the safety off. Run it once with dry_run on, read the report, then flip it off.

    The inputs that matter

    There are only four, and a beginner only really sets two:

    • name_pattern - text to match against entry names. Case-insensitive, and it supports regex. Leave blank to ignore. Gotcha: it's a substring search (re.search), not a full match, so "v1" will match any name containing "v1" anywhere.
    • tag_filter - a tag to match, case-insensitive partial match. Leave blank to ignore.
    • match_mode - how the two combine: Name only, Tag only, Name OR Tag, or Name AND Tag. Default is Name only.
    • dry_run - ON previews what would be deleted; OFF commits.

    The single report output is a text string: total entries, how many would be removed, and a list of the first 100 matched entries (with ... and N more if you're cleaning up a big mess). The report is the whole output - you wire it to a text preview, or honestly just read it in the node.

    Install

    It's a pure-Python, zero-dependency pack - no requirements, no models, nothing to pip install. Easiest path is ComfyUI Manager: search for "FrogUtilityTools". Or the old-school way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RabbitThatIsPink/FrogUtilityTools
    

    Restart ComfyUI. Nodes appear under 🐸 Frog Utility Tools in the search. Requires Python 3.10+, works on ComfyUI Desktop and Windows Portable.

    Troubleshooting

    • "ERROR: Could not find prompts.json." - the node hunts for data/prompts.json in FrogNodePack, the older Ribbity_Node_Suite / RibbityNodeSuite folders, then any custom_node with one. If you renamed your pack folder, that scan fails. Check the pack's folder name.
    • "ERROR: Provide at least a name pattern or tag filter." - you left both blank; the node refuses to delete everything.
    • "ERROR: Invalid name pattern regex" - your pattern isn't valid regex. If you don't want regex, stick to plain text.
    • After a live delete, refresh the library node's gallery or it'll still show the ghosts.

    One honest caveat: there's no undo beyond that backup file, and no prompt asking "are you sure?" when you flip dry_run off. Always run a dry-run pass first. For a tool that edits your saved work, that's the whole job - and this one does it well.

    Category🐸 Frog Utility Tools

    Inputs (4)

    NameTypeDefaultDescription
    name_patternSTRINGText to match against entry names (case-insensitive, supports regex). Leave blank to ignore.
    tag_filterSTRINGTag to match against entry tags (case-insensitive partial match). Leave blank to ignore.
    match_modeCOMBOName onlyHow to combine name and tag filters.
    dry_runBOOLEANtrueWhen ON, shows what WOULD be deleted without actually deleting. Turn OFF to commit deletion.

    Outputs (1)

    NameTypeDescription
    reportSTRING