Replies: 3 comments 7 replies
-
https://github.com/comfyanonymous/ComfyUI/blob/master/nodes.py#L763 If it's a custom node you are writing you can add an IS_CHANGED function to it. If the output of this function changes from one execution to the next the node will be run again. This is used in the LoadImage node to only rerun the graph if the image changes on the disk for example. |
Beta Was this translation helpful? Give feedback.
-
thanks, i'll take a look |
Beta Was this translation helpful? Give feedback.
-
Just in case someone is still looking for a solution - this worked for me to trigger a rerun every time a workflow is run:
|
Beta Was this translation helpful? Give feedback.
-
Is it possible to mark a node to always be run, even if it hasn't changed? For example, if I have a node that generates random numbers, I would like to get a new random number every time I generate an image. Right now the graph seems to be optimised to prevent re-running of nodes that haven't changed.
I've looked at the KSampler node, but I don't see anything obvious that indicates that a new random seed should always be generated.
Beta Was this translation helpful? Give feedback.
All reactions