stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[ ̷F̷e̷a̷t̷u̷r̷e̷ ̷R̷e̷q̷u̷e̷s̷t̷] [BUG] Add to queue option when detected multiple connections

Open ANTONIOPSD opened this issue 3 years ago • 6 comments

I don't know if this is implemented, but it would be great so multiple users can use it at the same time without crashing because of low VRAM.

EDIT:

The bug is:

If multiple people try to proccess prompts, only the first one will get the progress bar with the percent and the others will get a 0% progress bar but the they will be able to see the image that the first one is processing.

Anyone can press the "Interrupt" button and it will stop the current processing image even if it belongs to another user.

If you modify the html code in your browser and set the "Interrupt" button to be always shown, you can spam it and stop all the pending jobs in the queue even if they are not yours.

<button class="gr-button gr-button-lg gr-button-secondary self-start" id="txt2img_interrupt" title="Stop processing images and return any results accumulated so far." style="display: none;">Interrupt</button>

to

<button class="gr-button gr-button-lg gr-button-secondary self-start" id="txt2img_interrupt" title="Stop processing images and return any results accumulated so far." style="display: block;">Interrupt</button>

or just

style="display: none; to style="display: block;

and you will be able to spam the interrupt button and cancel all other people jobs in the queue.

ANTONIOPSD avatar Sep 20 '22 16:09 ANTONIOPSD

You can just open two tabs and see what happens if you try to generate on both at once. Yes, there is already a queue system implemented.

EyeDeck avatar Sep 20 '22 16:09 EyeDeck

I can confirm that multiple users can use it at the same time, though this does break the UI feedback of running jobs (progress bar, no indication your request is queued) so it can be unclear if it is working or not.

Xyem avatar Sep 21 '22 10:09 Xyem

I tried using the --listen arg and tried with 2 different computers and if you search on both at the same time, this is what happens:

Both computers show the progress bar, on the first computer the progress bar incresases, the second stays at 0 "waiting" for the first one to finish, then after the first one finishes, the progress bar on the second computer will dissapear and the "Generate" button will appear again on the second computer, then the program will start proccessing the second prompt (shown on the console) but it won't show any progress on the second computer and the image will appear on the second computer after it finishes proccessing without any notification or progress and this can cause other people to reload and send many prompts at the same time filling the queue with duplicated jobs.

ANTONIOPSD avatar Sep 29 '22 09:09 ANTONIOPSD

A better system would be to add the previous request to your percentage bar. Two users queue at the same time, user A queues first, user B is next User B's progress bar should reach 50% by the time user A is finished processing.

This can stack with the number of users, 5 in queue, by 80% it finally arrives on your request and hits 100% to render to you.

Intuitive and discourages users from spamming prompts and refreshing the window.

SpookySkeletons avatar Dec 06 '22 20:12 SpookySkeletons

That isn't intuitive at all. You expect the progress bar to show the progress of the generation request, not the entire process queue (especially because it only shows up when you made a generation request).

If there is a queue, it should show that. e.g. 0% (QUEUED: 3/5, eta: 01:34)

Xyem avatar Dec 06 '22 20:12 Xyem

e.e

Hilurex avatar May 28 '23 17:05 Hilurex