ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Feature request: Pause Queue

Open crowbait opened this issue 1 year ago • 11 comments

I regularly find myself in the situation that I'm working with ComfyUI and something else (eg. work related) comes up and requires my attention (and my PC's processing power). Now I always have to clear the queue, do whatever needs doing and then have to write the prompts I was trying out and queuing AGAIN, if I can even remember what all the stuff I was trying out actually was.

It would be great to be able to pause the queue after the current run finishes and then just resume it after an arbitrary amount of time. ComfyUI should clear all locks on VRAM on pause (so you can actually DO whatever you wanted to do; maybe this could also be a setting for the user to choose) and restart from scratch when the queue gets resumed.

Basically it's an extension of "clear queue and resume later" without the need of re-configuring everything you had queued.

crowbait avatar Jul 30 '23 18:07 crowbait

I came here to post something along these lines as well. Also, having the ability to save and load a queue would be a wonderful feature. I've had ComfyUI come to a halt as my machine's video memory gets sparse and then upon restarting the server, the queue needs to be populated again. Please have a look into adding a way to export and import queue items, that would be an amazing feature to have.

maestrodamus avatar Aug 02 '23 06:08 maestrodamus

agreed, I would like to be able to pause the queue as well

MojoJojo43 avatar Aug 25 '23 15:08 MojoJojo43

Would also love this

ghostsquad avatar Jan 03 '24 18:01 ghostsquad

This would be extremely useful.

fashiontechguru avatar Jan 12 '24 06:01 fashiontechguru

No news about this feature?

madsonweb avatar Feb 08 '24 15:02 madsonweb

Implementing the pause feature is possible, but it would require modification the execution model, so it might be better to pass it on after https://github.com/comfyanonymous/ComfyUI/pull/2666 is merged.

Once that functionality is implemented, it should be re-implemented upon the merge of the corresponding PR.

ltdrdata avatar Feb 09 '24 03:02 ltdrdata

Tip: On Windows you can pause a process with the Pause Break key and resume a process with Ctrl+Z. It may be useful for some as a temporary solution.

BlackGlory avatar Feb 09 '24 09:02 BlackGlory

Tip: On Windows you can pause a process with the Pause Break key and resume a process with Ctrl+Z. It may be useful for some as a temporary solution.

Similar on Linux with Ctrl+Z, but that doesn't free VRAM. I think that's the key aspect. Allow something else to use the VRAM.

WeeBull avatar Feb 10 '24 12:02 WeeBull

I'd be happy even if you could just pause the queue between generations.

deadcat000 avatar Mar 25 '24 11:03 deadcat000

Same here. Or in the worst case just an ability to export and load the queue...

thijs-hakkenberg avatar May 02 '24 11:05 thijs-hakkenberg

I had the same issue and made a command-line tool to fix it, "Yara". You can save a queue to disk, close ComfyUI, and whenever you're ready to resume generating you can load the queue again. In addition to saving/loading queues it also has a bunch of other features to solve various pain points I had.

It's only for Windows, though I made a Linux release on an older version. If you're on Linux and use Rust you should be able to compile it from source pretty easily, I think.

Satellile avatar May 08 '24 16:05 Satellile

It would be extremely helpful to be able to add things to the queue without having to start it immediately. Have separate "Add To Queue" and "Run Queue" buttons, maybe in the extra options section. Then you could load up the queue as you go along with things to run later and still be able to continue working using the "Queue Prompt" button.

Or, I would be overjoyed just to have pausing between generations, or exporting and loading queues, as others have mentioned. As the saying goes, "please don't let the perfect be the enemy of the good enough".

Blueridge-GH avatar Jun 08 '24 16:06 Blueridge-GH