comfyanonymous / ComfyUI

The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface.
GNU General Public License v3.0
41.4k stars 4.4k forks source link

Feature Request: Pause or Confirm Node (Supports Seed Cherry-Picking) #951

Open zer0TF opened 11 months ago

zer0TF commented 11 months ago

Would like to have a node type that is basically a "Pause", or "Confirm [Yes/No]" before continuing. It could work similarly to the Reroute node, accepting any input/output.

When that node is executed, pause and let the user either continue or stop/cancel the run.

The workflow I'm trying to create that I'm having trouble doing is:

Is this possible today, if not, what would the best way be to implement something like this?

Bocian-1 commented 11 months ago

To cancel execution at any time: see queue -> cancel

If you want it to explicitly pause and be able to continue later, you can use the Preview Bridge node from Impact Pack. It has some additional functionality beyond that too. Here's how that works: video . Mute nodes by setting mode to 'never' or with ctrl+m

You can also enable previews in samplers by adding --preview-method auto in the .bat file that you use to launch ComfyUI. For higher quality previews follow the instructions in readme

zer0TF commented 11 months ago

Thanks @Bocian-1. In the video, how did they resume the workflow after editing the image? I didn't quite catch that part.

It looks like it could be a good workaround for now, but it would still be a nice feature to have to be able to pause and continue a workflow without resorting to workarounds as well.

Bocian-1 commented 11 months ago

The preview bridge isn't actually pausing the workflow. It just stores an image and outputs it. It will always output the image it had stored at the moment that you queue prompt, not the one it stores at the moment the node executes. Instead of resuming the workflow you just queue a new prompt. Essentially it acts as a staggering mechanism.

Muting the node after it just ensures that the part of the workflow following the preview bridge doesn't execute first making you wait through a bunch of unnecessary operations.

chrisgoringe commented 5 months ago

https://github.com/chrisgoringe/cg-image-picker does what you want

Arthur-xu commented 2 weeks ago

Currently I'm using api to invoke comfyui api. But it was interrupted by Preview Image chooser. Is there any way to get these images and show it to user for choosing?

chrisgoringe commented 2 weeks ago

Preview Image Chooser isn't compatible with the API, it communicates directly with the web UI.

Arthur-xu commented 2 weeks ago

Preview Image Chooser isn't compatible with the API, it communicates directly with the web UI.

Oh. that explain it. Thanks for your clarification. Wondering is it possible to achieve this from your point of view? https://github.com/chrisgoringe/cg-image-picker

chrisgoringe commented 2 weeks ago

Maybe raise that as a question on the image picker GitHub and I'll address it there