From 31b7592179c6d3282c8f1f9bb978753a11163998 Mon Sep 17 00:00:00 2001 From: HelloClyde Date: Thu, 16 Oct 2025 07:59:40 +0800 Subject: [PATCH] Fix missing safe initialization of descendants in loops --- comfy_execution/caching.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comfy_execution/caching.py b/comfy_execution/caching.py index d58f931f2..350a5247b 100644 --- a/comfy_execution/caching.py +++ b/comfy_execution/caching.py @@ -420,6 +420,8 @@ class DependencyAwareCache(BasicCache): subcache = await super()._ensure_subcache(node_id, children_ids) await self.cache_key_set.add_keys(children_ids) for child_id in children_ids: + if child_id not in self.descendants: + self.descendants[child_id] = set() self.descendants[node_id].add(child_id) if child_id not in self.ancestors: self.ancestors[child_id] = set()