ποΈ PRO Clear Cache
The reset button your PRO Set/Get workflow forgot it needed
- status
If you use PRO Set and PRO Get, you will eventually hit the exact situation this node exists for: a variable name from a previous run that you don't want anymore, a stale value quietly flowing into your next batch, or a PRO_GetNode that keeps finding a variable you thought you deleted. PRO_ClearCacheNode is the reset button. Drop it in, flip its single toggle to true, run once, and the whole in-memory store the PRO nodes share comes back clean.
What it actually does
The PRO Set/Get family in this pack writes values into a module-level cache (qwen_cache.py) - a plain in-memory dict, keyed by variable name, that survives for the whole ComfyUI session. Because it's in-process memory and not a file, nothing about it is cleaned up between runs. PRO_ClearCacheNode.clear_cache() walks that store, wipes every entry, and returns a status string telling you how many variables it just killed. That's the entire job, and honestly that's fine.
Two practical notes. First, because the cache is memory-only, a ComfyUI restart already clears it - so this node is for mid-session resets, not as some kind of permanent cleanup routine. Second, it shares the same store as the other PRO nodes (and, per the source, it's written to be compatible with rgthree-comfy's Set/Get node cache), so clearing it nukes every stored variable, not just one. Don't wire this into a live workflow where it runs every queue; you'll wonder why your Get nodes started erroring.
The input and output
- confirm (BOOLEAN, default
false) - the only input, and it's a deliberate guard. Leave it false and the node just reports[PRO_Cache] Skipped. Set it true and it actually clears. The author made you say please, because a node that deletes state on accident is worse than one that never does. - status (STRING) - tells you how many variables were cleared (
[PRO_Cache] β Cleared N variable(s)) or that it skipped. It's an output node, so you can also wire this into a Text widget if you want the confirmation visible on the canvas instead of only in the console.
Installing it
This node ships inside COMFYUI_PROMPTMODELS (displayed in Manager as PromptModels Studio). Install the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
Then restart ComfyUI. It needs ComfyUI 0.26.0+ (the v3 pack uses the newer comfy_api.latest extension API - on older builds the whole pack fails to load and the console tells you to update or install promptmodels 2.x). No API key needed here; this is pure local utility.
Common issues
The most common "problem" is really a misunderstanding: after you clear the cache, any PRO_GetNode pointing at a now-missing name raises a ValueError listing the available variables. That's the intended feedback, not a bug - re-run your Set nodes and you're fine. And if you set confirm to true and nothing seems to happen, check the console for the status line; the node prints there as well as returning the string.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| confirm | BOOLEAN | false | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | β |