diff --git a/comfy_execution/caching.py b/comfy_execution/caching.py index a579982a0..17217b1c6 100644 --- a/comfy_execution/caching.py +++ b/comfy_execution/caching.py @@ -103,15 +103,12 @@ class CacheKeySetInputSignature(CacheKeySet): self.updated_node_ids = set() self.node_sig_cache = {} - """Nodes' immediate node signatures.""" self.ancestry_cache = {} - """List of a node's ancestors.""" def include_node_id_in_input(self) -> bool: return False async def update_cache_key(self, node_id): - """Update key using cached outputs as part of the input signature.""" if node_id in self.updated_node_ids: return if node_id not in self.keys: @@ -123,7 +120,6 @@ class CacheKeySetInputSignature(CacheKeySet): return node_id in self.updated_node_ids async def add_keys(self, node_ids): - """Initialize keys.""" for node_id in node_ids: if node_id in self.keys: continue @@ -211,7 +207,7 @@ class CacheKeySetInputSignature(CacheKeySet): if is_link(inputs[key]): ancestor_id = inputs[key][0] hashable = get_hashable(input_data_all[key]) - if hashable is Unhashable or is_link(input_data_all[key]): + if hashable is Unhashable or is_link(input_data_all[key][0]): # Link still needed node_inputs[key] = inputs[key] if ancestor_id not in ancestors: @@ -281,11 +277,9 @@ class BasicCache: pass async def _update_cache_key_immediate(self, node_id): - """Update the cache key for the node.""" await self.cache_key_set.update_cache_key(node_id) def _is_key_updated_immediate(self, node_id): - """False if the cache key set is an updatable type and it hasn't been updated yet.""" return self.cache_key_set.is_key_updated(node_id) def _set_immediate(self, node_id, value): diff --git a/execution.py b/execution.py index d2532552d..1c4f851e5 100644 --- a/execution.py +++ b/execution.py @@ -536,7 +536,6 @@ async def execute(server: PromptServer, dynprompt: DynamicPrompt, caches: CacheS unblock() asyncio.create_task(await_completion()) return (ExecutionResult.PENDING, None, None) - if len(output_ui) > 0: ui_outputs[unique_id] = { "meta": { @@ -549,7 +548,6 @@ async def execute(server: PromptServer, dynprompt: DynamicPrompt, caches: CacheS } if server.client_id is not None: server.send_sync("executed", { "node": unique_id, "display_node": display_node_id, "output": output_ui, "prompt_id": prompt_id }, server.client_id) - if has_subgraph: cached_outputs = [] new_node_ids = []