-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Reboot button #1814
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
Reboot button #1814
Conversation
Added screenshot with reboot button.
Work 🤗 |
…menu under 'Change Reboot Server Button Location' locations available are 'Menu Bar Top Icon' this places a small ⚡ in the top right corner next to settings. 'Small Button' This places the button as a small button next to View History. 'Main Menu' This places the button under Load Default on the main menu. I also added a toggle in the Settings Menu so you can choose whether it confirms you wanting to reboot the server
updated the readme to inform about new features added for the reboot button
updated screenshot
Updated Changes
|
I'm going to need to test this properly on linux/windows to make sure there are no unintended side effects to restarting it with execv. |
I think it's worth adding that autorun does not work when restarting, but remains on the same page.
It seems to me that it is not worth disabling "Require confirmation when rebooting server" for a small icon near the settings. |
This needs a command line option to enable it and be disabled by default, it is too much power on a web request, unless you are running locally just for you, it is not a power you would like to give the user. |
I think a neater (safer) solution to this would be to provide an API call to shut down with a special exit code that a wrapper script can use to restart the server. That allows you to customize the restart if needed, and doesn't give direct access to exec things. |
In that case, what about adding it as a manager feature? |
I tested this feature in Manager. When providing a reboot guide after installation, the buttons are selectively exposed in a limited manner. And there is currently an issue when using the portable version. In the While there is no problem with the functionality of ComfyUI itself, if you try to terminate it by pressing ctrl-c, the first press will end the pause, requiring a second ctrl-c to fully terminate it. Furthermore, there are some points of conflict not with ComfyUI itself, but with ComfyUI-Manager. To provide logging functionality in ComfyUI-Manager, stderr and stdout are hooked, and file closure is done using atexit.register upon program exit. However, with this approach, atexit.register is not triggered. It would be appreciated if you could enable the registration of an exit command, such as an onReboot handler, to execute commands before restarting. ps. The pause issue in the portable version seems challenging, and aside from removing the pause, there doesn't seem to be an immediate solution. |
The whole point of this feature is to make sure that resources recently downloaded are recognized by ComfiUI and loaded properly, right? Perhaps it would be more beneficial to focus on this feature: the hot-loading of new resources. But besides that use case, it's possible that someone might want it to reboot the entire system due to a major failure (though I have never found myself in that situation). If a restart feature is required for this reason, maybe we can take the API idea but make it only accessible through as a REST API call, so maybe going to a browser and visiting 127.0.0.1:8188/reboot would trigger the reboot. In that way eventually access control could be added in a web manner, so only certain users/IPs could trigger the feature. |
Is this supposed to reboot my Linux desktop or just comfyui? I hope the latter. Currently whenever I press reboot server nothing happens. console logs:
on the hand the comfui restart works when I press it after |
Any updates on this? |
Any update on this topic? My ComfyUI got stuck and I can not access my computer remotely. |
frontend is replaced by https://github.com/Comfy-Org/ComfyUI_frontend now a proper restart button was discussed by the Comfy Org team the other day, so might be coming? |
The server.py file was modified to add a reboot API call.
Added API route for server reboot.
The ui.js file was modified to add a reboot server button that makes a API call
to reboot the ComfyUI server.
Added a restart server button that makes an API call to the reboot AP…