Skip to content

Commit

Permalink
Nodes using UNIQUE_ID as input are NOT_IDEMPOTENT (#4793)
Browse files Browse the repository at this point in the history
As suggested by @ltdrdata, we can automatically consider nodes that take
the UNIQUE_ID hidden input to be NOT_IDEMPOTENT.
  • Loading branch information
guill committed Sep 5, 2024
1 parent dc2eb75 commit 0c7c98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comfy_execution/caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_immediate_node_signature(self, dynprompt, node_id, ancestor_order_mappin
class_type = node["class_type"]
class_def = nodes.NODE_CLASS_MAPPINGS[class_type]
signature = [class_type, self.is_changed_cache.get(node_id)]
if self.include_node_id_in_input() or (hasattr(class_def, "NOT_IDEMPOTENT") and class_def.NOT_IDEMPOTENT):
if self.include_node_id_in_input() or (hasattr(class_def, "NOT_IDEMPOTENT") and class_def.NOT_IDEMPOTENT) or "UNIQUE_ID" in class_def.INPUT_TYPES().get("hidden", {}).values():
signature.append(node_id)
inputs = node["inputs"]
for key in sorted(inputs.keys()):
Expand Down

0 comments on commit 0c7c98a

Please sign in to comment.