V3 Nodes: refactor check for fingerprint_inputs and check_lazy_status

This commit is contained in:
bigcat88
2025-07-14 17:59:34 +03:00
parent a580176735
commit 79098e9fc8
3 changed files with 10 additions and 7 deletions

View File

@@ -5,7 +5,10 @@ def first_real_override(cls: type, name: str, *, base: type) -> Optional[Callabl
"""Return the *callable* override of `name` visible on `cls`, or None if every
implementation up to (and including) `base` is the placeholder defined on `base`.
"""
base_func = getattr(base, name).__func__
base_attr = getattr(base, name, None)
if base_attr is None:
return None
base_func = base_attr.__func__
for c in cls.mro(): # NodeB, NodeA, ComfyNodeV3, object …
if c is base: # reached the placeholder we're done
break

View File

@@ -1115,8 +1115,6 @@ class ComfyNodeV3:
"""Optionally, define this function to fingerprint inputs; equivalent to V1's IS_CHANGED."""
raise NotImplementedError
fingerprint_inputs = None
@classmethod
def check_lazy_status(cls, **kwargs) -> list[str]:
"""Optionally, define this function to return a list of input names that should be evaluated.
@@ -1133,8 +1131,6 @@ class ComfyNodeV3:
"""
return [name for name in kwargs if kwargs[name] is None]
check_lazy_status = None
@classmethod
def GET_SERIALIZERS(cls) -> list[Serializer]:
return []