Custom Node Creation - How accept input of image batch and output modified batch #2285
-
To start, I am a total beginner at Python & ComfyUI so I suspect I am making a very simple mistake, but I've tried finding other similar questions here & Stack Overflow to no avail. I'm attempting to create a custom node for ComfyUI to extract a range of RGB colors for either a single image or a batch (array) of images, extracted from a video using another node (Load Video from VideoHelperSuite). The single image node works fine, however the batch node only runs the function on the first frame. Here's my current code for the batch node:
The return function is outside of the for loop, so it should be returning the whole array of frames, at least that's the intent. It's instead returning the completed function for only the first frame/image in the batch. For reference, on the workflow, the input of this node is connected directly to the output of load_video(VHS). Thank you in advance to anyone who can help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured it out. I took the execution code from a controlnet processor:
|
Beta Was this translation helpful? Give feedback.
I figured it out. I took the execution code from a controlnet processor: