Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
74b7233f
Commit
74b7233f
authored
Feb 04, 2024
by
comfyanonymous
Browse files
Document IS_CHANGED in the example custom node.
parent
66e28ef4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
custom_nodes/example_node.py.example
custom_nodes/example_node.py.example
+13
-0
No files found.
custom_nodes/example_node.py.example
View file @
74b7233f
...
@@ -6,6 +6,8 @@ class Example:
...
@@ -6,6 +6,8 @@ class Example:
-------------
-------------
INPUT_TYPES (dict):
INPUT_TYPES (dict):
Tell the main program input parameters of nodes.
Tell the main program input parameters of nodes.
IS_CHANGED:
optional method to control when the node is re executed.
Attributes
Attributes
----------
----------
...
@@ -89,6 +91,17 @@ class Example:
...
@@ -89,6 +91,17 @@ class Example:
image = 1.0 - image
image = 1.0 - image
return (image,)
return (image,)
"""
The node will always be re executed if any of the inputs change but
this method can be used to force the node to execute again even when the inputs don't change.
You can make this node return a number or a string. This value will be compared to the one returned the last time the node was
executed, if it is different the node will be executed again.
This method is used in the core repo for the LoadImage node where they return the image hash as a string, if the image hash
changes between executions the LoadImage node is executed again.
"""
#@classmethod
#def IS_CHANGED(s, image, string_field, int_field, float_field, print_to_screen):
# return ""
# A dictionary that contains all nodes you want to export with their names
# A dictionary that contains all nodes you want to export with their names
# NOTE: names should be globally unique
# NOTE: names should be globally unique
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment