ComfyUI/comfy_execution
Rattus 9e0cc78024 execution: Roll the UI cache into the outputs
Currently the UI cache is parallel to the output cache with
expectations of being a content superset of the output cache.
At the same time the UI and output cache are maintained completely
seperately, making it awkward to free the output cache content without
changing the behaviour of the UI cache.

There are two actual users (getters) of the UI cache. The first is
the case of a direct content hit on the output cache when executing a
node. This case is very naturally handled by merging the UI and outputs
cache.

The second case is the history JSON generation at the end of the prompt.
This currently works by asking the cache for all_node_ids and then
pulling the cache contents for those nodes. all_node_ids is the nodes
of the dynamic prompt.

So fold the UI cache into the output cache. The current UI cache setter
now writes to a prompt-scope dict. When the output cache is set, just
get this value from the dict and tuple up with the outputs.

When generating the history, simply iterate prompt-scope dict.

This prepares support for more complex caching strategies (like RAM
pressure caching) where less than 1 workflow will be cached and it
will be desirable to keep the UI cache and output cache in sync.
2025-10-23 21:28:38 +10:00
..
caching.py execution: fold in dependency aware caching / Fix --cache-none with loops/lazy etc (Resubmit) (#10440) 2025-10-22 15:49:05 -04:00
graph_utils.py V3 Node Schema Definition - initial (#8656) 2025-07-31 18:02:12 -04:00
graph.py execution: Roll the UI cache into the outputs 2025-10-23 21:28:38 +10:00
progress.py Fix progress update crossover between users (#9706) 2025-09-04 19:13:28 -04:00
utils.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00
validation.py Reland union type (#5900) 2024-12-04 15:12:10 -05:00