Nodes/ComfyUI-GeN13/Prompt Cache (GeN13)
ComfyUI Node

Prompt Cache (GeN13)

Saves upstream text, such as an LLM script, to a file so it can be reused later without loading the upstream nodes; keeps one automatic backup and any number of favorites.

By heigen13·Created 3 days ago·Updated about 21 hours ago· 1
Prompt Cache (GeN13)
    • text
    ◄modeauto►
    ◄save_aslast_prompt.txt►
    ◄read_file(same as save_as)►
    ◄auto_backuptrue►
    ◄text—►
    CategoryGeN13/text

    Inputs (5)

    NameTypeDefaultDescription
    modeCOMBOautoMode: auto uses and saves upstream text if connected, else reads the file. 1 always runs upstream, 2 reads the file only, 3 outputs nothing.
    save_asSTRINGlast_prompt.txtSave as: file name in output\prompt_cache\; .txt is added if omitted. Empty saves to last_prompt.txt.
    read_fileCOMBO(same as save_as)Read file: follows save_as by default. .prev files are automatic backups, .fav files are favorites; the list refreshes after each run.
    auto_backupBOOLEANtrueAuto backup: before overwriting, the old file is kept as <name>.prev.txt (one generation); unchanged text is not saved again.
    textoptSTRINGText: the upstream source, usually an LLM output; upstream runs only in the modes that need it.

    Outputs (1)

    NameTypeDescription
    textSTRINGText: upstream text in auto and 1, file content in 2, empty in 3.