custom-nodes/js/javascript_hooks #634
Replies: 1 comment
-
|
To get a value passed to the node after execution use the following:
def execute(self, inp0):
result = inp0.reverse()
return { "ui": { "input": inp0 }, "result": result }
async nodeCreated(node)
{
if (node.comfyClass === "MyNode")
{
node.onExecuted = function (ui)
{
console.log(ui.input)
}
}
}note that if you use
RETURN_NAMES = ("out0",)
RETURN_TYPES = ("STRING",)
OUTPUT_IS_LIST = (True,)
def execute(self, inp0):
result = [v.reverse() for v in inp0]
return { "ui": { "input": [inp0] }, "result": ] } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
custom-nodes/js/javascript_hooks
https://docs.comfy.org/custom-nodes/js/javascript_hooks
Beta Was this translation helpful? Give feedback.
All reactions