Nodes/Mango Node Pack/Load Prompt (Mango)
ComfyUI Node

Load Prompt (Mango)

Pull yesterday's saved prompt back into today's graph

By mang01010·Created 2 years ago·Updated 5 months ago· 3
Load Prompt (Mango)
    • STRING
    filename

    Load Prompt (Mango) is the read side of the pack's prompt-archive loop. It scans your ComfyUI output folder (and every subfolder) for .txt files, presents them in a dropdown, and returns the contents of the one you pick as a plain STRING. Combined with Save Prompt (Mango) on the write side, you get a self-contained prompt library living inside your output folder - no database, no plugin, just text files you can open in any editor.

    The node description even tells you its intended partner: "Perfect to serve up a prompt for PromptMango!" - meaning you load a saved prompt and feed it into the pack's Prompt (Mango) node via its optional string input, or into any text input that expects the full prompt. It's a small node, but it closes the loop that makes the pack's whole "don't lose your prompts" pitch work.

    How it works

    At graph-load time the node walks the output directory recursively, collects every .txt file, and turns the relative paths into dropdown choices (sorted alphabetically). When you select one and run, it reads the file as UTF-8 text and returns it. If there are no .txt files at all, the dropdown gets a single empty fallback option so the node doesn't crash - pick that and you'll get an empty string back. The dropdown is built once when the node loads, so files you add after loading a workflow won't show up until you reload the graph.

    Inputs and outputs

    • filename - the only input: a dropdown of .txt files under the output folder, including subfolders.
    • STRING - the output: the file's full text.

    There are no knobs, no options, no modes. That's the whole node.

    Installing it

    Load Prompt (Mango) ships in the Mango Node Pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mang01010/MangoNodePack
    

    Restart ComfyUI, or install "Mango Node Pack" via ComfyUI Manager. The README lists pip install safetensors as the only extra dependency.

    Gotchas

    The main gotcha is that same stale-dropdown behavior: if you just saved a prompt with Save Prompt (Mango) and then try to load it in the same session without reloading the workflow, it won't appear yet. Reload the node or the graph and it shows up. The other quirk is that it reads from the output folder specifically - prompts saved elsewhere won't be listed, and if you clear your output folder (or it lives on a temp drive), your archive vanishes with it. And since it returns raw file text, a saved prompt with trailing newlines or odd formatting comes back exactly as written - fine for feeding a prompt box, but don't expect any cleanup. For a zero-database prompt archive, this plus its Save sibling is about as simple as it gets.

    CategoryMango Node Pack/Metadata

    Inputs (1)

    NameTypeDefaultDescription
    filenameCOMBOSelect a .txt file from the output folder and its subfolders.

    Outputs (1)

    NameTypeDescription
    STRINGSTRING