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.
Prompt Cache (GeN13)
- text
◄modeauto►
◄save_aslast_prompt.txt►
◄read_file(same as save_as)►
◄auto_backuptrue►
◄text—►
CategoryGeN13/text
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | auto | Mode: 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_as | STRING | last_prompt.txt | Save as: file name in output\prompt_cache\; .txt is added if omitted. Empty saves to last_prompt.txt. |
| read_file | COMBO | (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_backup | BOOLEAN | true | Auto backup: before overwriting, the old file is kept as <name>.prev.txt (one generation); unchanged text is not saved again. |
| textopt | STRING | Text: the upstream source, usually an LLM output; upstream runs only in the modes that need it. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | Text: upstream text in auto and 1, file content in 2, empty in 3. |