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]: Improve "Interrupt" functionality speed #7834

Closed
1 task done
Photosounder opened this issue Feb 15, 2023 · 13 comments
Closed
1 task done

[Feature Request]: Improve "Interrupt" functionality speed #7834

Photosounder opened this issue Feb 15, 2023 · 13 comments
Labels
enhancement New feature or request

Comments

@Photosounder
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

When I press the "Interrupt" button usually I don't want to save or finish the half-baked image I'm interrupting, I want it to stop asap so I can move on to the next image I want to generate. Instead the Interrupt button rather absurdly insists on making SD go through all the phases needed to generate a finalised image, which in the case of high resolution prompts can take a long time and take up the whole VRAM just to finish an aborted image that I don't want to finish.

Proposed workflow

  1. Press "Interrupt"
  2. Processing actually stops and no image is saved, unless maybe it was already on the last step, but we need another button to interrupt after the current image is done.

Additional information

No response

@Photosounder Photosounder added the enhancement New feature or request label Feb 15, 2023
@DejitaruJin
Copy link
Contributor

Chiming in with that proposed workflow, it would be kind of nice to have a three-button "Stop (now), Pause (after this image), Skip (now)" sort of interface, where the first two buttons would change to "Cancel" and "Resume" on pause. With this, we'd have options depending on whether the situation is, "Oh no I set the CFG way too high, scrap everything," or just, "I want to pause this batch so I can watch a quick YouTube video without crashing everything".

@iluzek
Copy link

iluzek commented Mar 10, 2023

Not sure if this will have any traction, but I believe a 'pause' and 'resume' buttons on top of suggested buttons would also be useful. If I could pause the process of a long 'image' or 'large batch' with some sort of way to resume from the 'file', that would be super useful.

The most apropriate example I have right now. Running a batch job for 10+ hours with 10 more hours to go, but need to work on one image or do something else in meantime and require to pause the SD. Right now I can either kill it completely and 'give up' on this batch or would need to 'recreate' my settings and find the exact place the batch stopped to resume (very much a hassle).

@alienware377
Copy link

Please please please add this, I'm super tired of deciding whether to force stop cmd or to wait for interrupt to so called "interrupt" and having to wait a long time either way.

@Lefkowitz-s
Copy link

This would be most welcome. Much like ctrl+alt+delete, the current interrupt button doesn't actually work as an emergency stop, because it doesn't seem to even register the button press until it's done with whatever it's doing. Maybe there's some use for finalizing the image before stopping, but when I've just accidentally queued up an image that my PC can't handle, what I really need is a button that says "Drop everything RIGHT NOW", not "please stop when you get a chance, no pressure."
Right now the only solution is to kill the webui-user.bat window and restart it, and even that can be tricky when your computer is struggling.

@FutonGama
Copy link

I hope this get better

@catboxanon
Copy link
Collaborator

catboxanon commented Aug 8, 2023

#12338 partially resolves this. I agree the interrupt functionality could be further improved to stop all remaining jobs more quickly. Technically the functionality is doing it's job to interrupt every process after it's clicked but it should be able to exit out of that queue of jobs more early, so I'm rewording this issue a bit.

@catboxanon catboxanon changed the title [Feature Request]: Make "Interrupt" actually just interrupt and nothing else [Feature Request]: Improve "Interrupt" functionality speed Aug 8, 2023
@catboxanon
Copy link
Collaborator

catboxanon commented Aug 25, 2023

Should be resolved by #12634. If there's any specific interrupts that you believe are not accounted for to exit out of quickly feel free to open a new issue with more specifics. Note that anything related to extensions needs to be handled by the extension authors upstream.

@Petomai
Copy link

Petomai commented Apr 20, 2024

Why is this topic closed? It is the best topic. I press interrupt, it just sits there for 10 minutes. I have to go take a break, get coffee, go drive to the store and buy a snack, come home to "Interrupting..."

@alienware377
Copy link

Why is this topic closed? It is the best topic. I press interrupt, it just sits there for 10 minutes.

It seems you haven't yet updated to a more recent version, or your recent version somehow missed the upgrades we recently got. In that case, fresh install. I agree that the topic was closed prematurely, but it's resolved already. In recent versions the Webui will give a little notification box at the top right that says that if you click once, the generating will stop after the current photo (useful for batches) and if you press again it will try to stop immediately. Great new feature. It doesn't always stop as fast as you'd like, especially when doing very high res, but it stops super super fast compared to before.

@encrypted-fox
Copy link

Made fresh install, still need to wait A LOT of time.
My setup: rtx 3050 ti, i9-12900, 32 ram. Windows 11.
My webui-user:

@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--medvram --upcast-sampling --xformers --opt-channelslast --no-half-vae
set CUDA_MODULE_LOADING=LAZY
set NUMEXPR_MAX_THREADS=24
set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.7,max_split_size_mb:512

call webui.bat

Steps:

  1. Click generate. Wait for generation to start.
  2. Click interrupt (gen process bar 30% approx.)
  3. Wait 5-10 minutes, then it is stopping (or not in some cases)

Other situations:

  1. Click generate. Wait till tiling upscale finish.
  2. If interrupt before hires starts it will never be interrupted OR FINISHED.

I don't know what to do in this situation, tried different models, settings, comandline args, tried fresh install, reboot, installed new drivers, etc.

@Niphion
Copy link

Niphion commented Jul 19, 2024

It's been over 1 year and interrupting time still sucks.
Goes on and on and on and on...
I have to completely shut down the CMD so many times just for it to finally stop..

@alexandercommon
Copy link

Yeah, it works about 25% of the time. I usually just close the batch job and restart. It's much faster.

@AlexaWhite
Copy link

Still sucks that "Interrupt" button didn't do abrupt stop of generation. Like false advertisement. False facade.

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

No branches or pull requests