Skip to content

Commit

Permalink
Revert "Reduce repeated calls of get_immediate_node_signature for anc…
Browse files Browse the repository at this point in the history
…estors in cache (#4871)"

This reverts commit f6b7194.
  • Loading branch information
comfyanonymous committed Sep 14, 2024
1 parent cf80d28 commit b3ce8fb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions comfy_execution/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def __init__(self, dynprompt, node_ids, is_changed_cache):
super().__init__(dynprompt, node_ids, is_changed_cache)
self.dynprompt = dynprompt
self.is_changed_cache = is_changed_cache
self.immediate_node_signature = {}
self.add_keys(node_ids)

def include_node_id_in_input(self) -> bool:
Expand Down Expand Up @@ -95,8 +94,6 @@ def get_immediate_node_signature(self, dynprompt, node_id, ancestor_order_mappin
if not dynprompt.has_node(node_id):
# This node doesn't exist -- we can't cache it.
return [float("NaN")]
if node_id in self.immediate_node_signature: # reduce repeated calls of ancestors
return self.immediate_node_signature[node_id]
node = dynprompt.get_node(node_id)
class_type = node["class_type"]
class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
Expand All @@ -111,7 +108,6 @@ def get_immediate_node_signature(self, dynprompt, node_id, ancestor_order_mappin
signature.append((key,("ANCESTOR", ancestor_index, ancestor_socket)))
else:
signature.append((key, inputs[key]))
self.immediate_node_signature[node_id] = signature
return signature

# This function returns a list of all ancestors of the given node. The order of the list is
Expand Down

0 comments on commit b3ce8fb

Please sign in to comment.