Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] For the modification to support real-time drawing #97

Closed
RexLeeGrey opened this issue Apr 7, 2024 · 7 comments
Closed

Comments

@RexLeeGrey
Copy link

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.

@chrisgoringe
Copy link
Owner

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?

@RexLeeGrey
Copy link
Author

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.

@RexLeeGrey
Copy link
Author

RexLeeGrey commented Apr 8, 2024

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.

@chrisgoringe
Copy link
Owner

chrisgoringe commented Apr 11, 2024

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.

@RexLeeGrey
Copy link
Author

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.
image
image
image
image

@chrisgoringe
Copy link
Owner

I'll look at that. But for the blinking, try using the sleep option, set it to 2 or 3

@chrisgoringe
Copy link
Owner

Closing this - I've raised an issue on the simple gate repo - chrisgoringe/cg-simple-gate#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants