mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-28 08:46:35 +00:00
Added 'not_idempotent' support for SchemaV3
This commit is contained in:
parent
fe9a47ae50
commit
002e16ac71
@ -695,6 +695,8 @@ class SchemaV3:
|
||||
"""Flags a node as experimental, informing users that it may change or not work as expected."""
|
||||
is_api_node: bool=False
|
||||
"""Flags a node as an API node. See: https://docs.comfy.org/tutorials/api-nodes/overview."""
|
||||
not_idempotent: bool=False
|
||||
"""Flags a node as not idempotent; when True, the node will run and not reuse the cached outputs when identical inputs are provided on a different node in the graph."""
|
||||
|
||||
|
||||
class Serializer:
|
||||
@ -855,6 +857,13 @@ class ComfyNodeV3:
|
||||
cls.GET_SCHEMA()
|
||||
return cls._OUTPUT_TOOLTIPS
|
||||
|
||||
_NOT_IDEMPOTENT = None
|
||||
@classproperty
|
||||
def NOT_IDEMPOTENT(cls):
|
||||
if cls._NOT_IDEMPOTENT is None:
|
||||
cls.GET_SCHEMA()
|
||||
return cls._NOT_IDEMPOTENT
|
||||
|
||||
FUNCTION = "execute"
|
||||
|
||||
@classmethod
|
||||
@ -893,6 +902,8 @@ class ComfyNodeV3:
|
||||
cls._OUTPUT_NODE = schema.is_output_node
|
||||
if cls._INPUT_IS_LIST is None:
|
||||
cls._INPUT_IS_LIST = schema.is_input_list
|
||||
if cls._NOT_IDEMPOTENT is None:
|
||||
cls._NOT_IDEMPOTENT = schema.not_idempotent
|
||||
|
||||
if cls._RETURN_TYPES is None:
|
||||
output = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user