From 9c1e3f7b986c040cf5fd1665fcd964b357dcc39d Mon Sep 17 00:00:00 2001 From: Jacob Segal Date: Sat, 17 Feb 2024 21:02:59 -0800 Subject: [PATCH] Fix an overly aggressive assertion. This could happen when attempting to evaluate `IS_CHANGED` for a node during the creation of the cache (in order to create the cache key). --- comfy/caching.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comfy/caching.py b/comfy/caching.py index ef047dcc5..7730a3713 100644 --- a/comfy/caching.py +++ b/comfy/caching.py @@ -172,7 +172,8 @@ class BasicCache: self.cache[cache_key] = value def _get_immediate(self, node_id): - assert self.cache_key_set is not None + if self.cache_key_set is None: + return None cache_key = self.cache_key_set.get_data_key(node_id) if cache_key in self.cache: return self.cache[cache_key]