Shutdown button
Is your feature request related to a problem? Please describe. I frequently have to restart the application and it is not very comfortable to kill python.exe process every time especially if I run something else along.
Describe the solution you'd like A simple button somewhere in GUI that would initiate shutdown or just force-kill used python processes.
I have a stop.bat file in my directory with the following code:
taskkill /im "cmd.exe"
taskkill /im "cmd.exe" /f
SLEEP 2
taskkill /im "conhost.exe"
taskkill /im "conhost.exe" /f
SLEEP 2
taskkill /im "python.exe"
taskkill /im "python.exe" /f
exit
Just double click on it and it'll kill the process
I have a
stop.batfile in my directory with the following code:
I agree that batch works but it is still killing processes with possibility of killing the ones not related to the webui. There should be standard way to turn the interface off rather than nuking processes.
You're not happy sending ctrl-c to the terminal?
I completely agree, but nuking it is the only thing that seems to work for me most times. Often times it gets SO stuck that sending ctrl+c does nothing.
Out of all the times I have turned the application off - "CTRL+C" worked only once, I would have no problem if I could just CTRL+C it. I guess the proper ctrl+c would be an acceptable alternative to the button in gui.
There can be some threads to wait for, and because of that a slight delay, but I've never seen a single SIGINT not work.
I'll see if I can pack something tiny in a the bottom of the settings page.
For one thing, CTRL+C in the terminal does not clean images saved in the %TEMP% folder.
Context for those unaware: The UI saves every image generated in %TEMP%/tmpXXXXXXXX/, regardless of your folder and save settings.
The UI saves every image generated in %TEMP%/tmpXXXXXXXX/, regardless of your folder and save settings.
Not just that, it creates multiple copies of generated files, and not like 2-3 duplicates - more like 20-30. I just cleaned 80+ Gb of this crap 😠
A proper shutdown button is needed. A CTRL-C to the terminal can cause FS corruption if the running processes don't properly shutdown. When stable diffusion experiences FS corruption, then you get errors like this when you start webui: "UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9c in position 2: invalid start byte". Reloading stable diffusion is the only way to clear the corruption.
Reloading stable diffusion is the only way to clear the corruption.
What does "reloading stable diffusion" mean practically in this case?
@puyebu Let me know what you think about this shutdown button extension: https://github.com/EnsignMK/sd_shutdown_button
The aforementioned extension and the API routes should be sufficient for this now. Closing.