[Feature Request] For the modification to support real-time drawing
RexLeeGrey opened this issue · 7 comments
First of all thank you for this node is very good to use!
There is an idea I don't know if it is troublesome to implement, transform this node of yours into a new node, the new node will not normally pass data or pause the current queue, there is a button on the node that when pressed will allow data to be passed through once, and then continue to remain in a long closed state. It's like a long closed solenoid valve. This way, in a real-time painting workflow or other workflows, you can allow subsequent workflows to take effect at the touch of a button, without having to switch subsequent workflows on and off frequently.
I don't know if this node can be realized inside comfyui, my code level is limited, I wrote it in gpt for two days but I didn't understand it, please answer my questions.
Thanks for the idea... I'm not familiar with real time painting nodes. Does that mean the workflow runs continuously? Whenever you make a change to the painting the new version gets submitted?
If that is correct, I can imagine a very simple node which just does two things:
- normally, when it receives an input, it cancels the run
- it has a button which, when pressed, causes it to pass the next image it receives through instead
Have I understood?
When painting in real time, Auto Queue in Extra Options is turned on, and it should be said that usually when it receives input, it does not transfer data, rather than canceling the run, because the real time painting workflow runs continuously.
All other understandings are correct.
workflow.json
A simple real time painting workflow is uploaded over here, if the envisioned node is placed between the VAE decode and save image, then when painting in the painting window with auto-queue on, the image will only be transferred to the preview window, and when a satisfactory image is obtained, by clicking on this button, the image will be transferred to the save image, and thus be saved.
OK, I've made a node :). Take a look and see if it does what you are after. It does work by cancelling the workflow (because that's the only way I know of to not return progress), but with Auto Queue on that should be ok?
Note that if you use the sleep (a time in seconds) you can open or close the gate during that time window.
Very impressive work! This was able to get the live drawing workflow on comfyui to work perfectly and switch more cleanly.
However, with the nodes blinking constantly and the buttons being unintuitive when running, I was wondering if it would be possible to make a button like the one below so that it could control the opening and closing of the gate. For example, using the gate as an input and connecting the button to it would allow you to switch states by clicking on it. And after miniaturizing or moving the node farther away, the blinking wouldn't affect the creator too much.
I'll look at that. But for the blinking, try using the sleep option, set it to 2 or 3
Closing this - I've raised an issue on the simple gate repo - chrisgoringe/cg-simple-gate#1