Nodes/WAS Node Suite v3/Noodle Soup Pantry Import
ComfyUI Node Runs on cloud

Noodle Soup Pantry Import

Someone sent you a pantry file — here's how you take it in

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Noodle Soup Pantry Import
    • report
    • terms
    • entries
    file
    mode

    Noodle Soup Pantry Import reads a Noodle Soup Prompts pantry JSON into your stored pantry, so a terminology list someone shared as a file actually becomes usable in your workflows. The file is a plain JSON object mapping terminology names to lists of words - the exact shape Noodle Soup Pantry Export writes. Drop it in ComfyUI's input folder, point this node at it, and the words are in the pantry for Noodle Soup Pick and __term__ wildcard replacement from then on.

    It's one of the terminology nodes in WAS Node Suite v3 (WAS Suite/Text/Terminology) - the import side of the suite's wildcard system, which swaps __animals__ in a prompt for a random word out of the stored pantry (around 17,500 words, 84 terminologies, living in the suite's state database next to your config.yaml).

    How it works

    Two inputs. The file menu lists every .json file in ComfyUI's input, output, and temp folders (plus anything under paths.allow_read in config), each labelled with where it sits - so a nsp_pantry.json in input and a same-named one in output don't blur together. Then mode decides how the file meets what you already have:

    • add to the pantry - keeps everything already stored and adds only the words the file has that a terminology doesn't. Your existing terms are untouched; the file's new words appear where they're missing. This is the safe default for grabbing a friend's additions.
    • replace the pantry - leaves the pantry holding exactly what the file holds, dropping every other terminology. This is the "start over from this file" mode, and it's destructive to anything you've collected that isn't in the file. Use it deliberately - restoring a backup, for instance - not casually.

    The file itself is left exactly where it is; import doesn't move or delete it. And everything read in counts as yours, which matters later: because imported words are marked as your additions, a Pantry Refresh - which merges the published list into the stored pantry - never removes them.

    Outputs are a report string (one line per figure, like entries added 12), plus terms and entries telling you how many terminologies and words the file held.

    Why you'd reach for it

    The workflow it exists for: a friend (or a shared workflow, or your own export from another machine) hands you a .json of curated terminologies. Import in add mode and their words join yours without you re-typing a list. It's also the restore half of a backup: export the whole pantry, wipe a machine, import the file in replace mode and you're back where you were.

    Installing it

    Part of WAS Node Suite v3:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WASasquatch/was-node-suite-comfyui.git
    

    or ComfyUI Manager → "WAS Node Suite v3", restart. ComfyUI 0.14.0+, Python 3.10+, no pip installs. Import reads a local file, so the network config flag isn't involved - that's only for Refresh.

    Where people get burned

    The big one is replace the pantry used by accident - it drops every terminology not in the file, including months of your own additions. If you're not certain the file is a complete backup of what you want, use add. Second: the file has to match the pantry shape (a JSON object of name → word list). Export a file once to see the format if you're hand-editing, because a malformed JSON fails cleanly but a file that's valid JSON with the wrong shape can import as zero usable terms. And don't expect an import to appear in pickers instantly if ComfyUI cached the pantry - a refresh or reload sorts that out.

    CategoryWAS Suite/Text/Terminology

    Inputs (2)

    NameTypeDefaultDescription
    fileCOMBOWhich pantry file to read. The menu lists every .json file in ComfyUI's input, output and temp folders and in any folder added under paths.allow_read in config.yaml, each labelled with the folder it sits in.
    modeCOMBO`add to the pantry` keeps everything already stored and adds the words the file has that a terminology does not. `replace the pantry` leaves the pantry holding exactly what the file holds, dropping every other terminology.

    Outputs (3)

    NameTypeDescription
    reportSTRINGWhat was read and what was stored, as one line per figure. Eg: 'entries added 12'.
    termsINTHow many terminologies the file held.
    entriesINTHow many words the file held, counting every terminology.