From fd7229e51b3fb3a07372c1fec4e6e58017277a2f Mon Sep 17 00:00:00 2001 From: Jacob Segal Date: Wed, 7 Aug 2024 22:35:18 -0700 Subject: [PATCH] List cached nodes in `execution_cached` message This was previously just bugged in this PR. --- execution.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/execution.py b/execution.py index 3bffae8e94f..ee675893328 100644 --- a/execution.py +++ b/execution.py @@ -466,15 +466,19 @@ def execute(self, prompt, prompt_id, extra_data={}, execute_outputs=[]): cache.set_prompt(dynamic_prompt, prompt.keys(), is_changed_cache) cache.clean_unused() - current_outputs = self.caches.outputs.all_node_ids() + cached_nodes = [] + for node_id in prompt: + if self.caches.outputs.get(node_id) is not None: + cached_nodes.append(node_id) comfy.model_management.cleanup_models(keep_clone_weights_loaded=True) self.add_message("execution_cached", - { "nodes": list(current_outputs) , "prompt_id": prompt_id}, + { "nodes": cached_nodes, "prompt_id": prompt_id}, broadcast=False) pending_subgraph_results = {} executed = set() execution_list = ExecutionList(dynamic_prompt, self.caches.outputs) + current_outputs = self.caches.outputs.all_node_ids() for node_id in list(execute_outputs): execution_list.add_node(node_id)