stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Feature Request]: Save configuration UI settings dynamically
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
Save settings dynamically so that when reloading the page, all settings are not reset to default values based on ui-config.json
Proposed workflow
- First initialization using ui-config.json
- When a user changes the setting value, it is saved to the browser's localstorage.
- If the user wants to reset the settings to the default value, the user just needs to delete the configuration file or reset the localstorage.
Additional information
No response
I am not familiar with the web, so I ask a question. Is local storage more suitable than cookies?
I am not familiar with the web, so I ask a question. Is local storage more suitable than cookies?
@burugaria7 Localstorage doesn't expire. Cookies are sent along with an HTTP header to the server but not for local storage as we just need to store some UI settings for the current device and browser.
Would it be better to save the settings on the server side, so you can use multiple devices?
anytime a change is made log it into ui-config-.json. Then give an option to restore from a default config (ie. ui-config-defaults.json)
you could even implement profiles to swap between the different options.
@PaintOnBrush Yes, I do like that too. But I have thought about sharing the gradio link with people I know so that it can be used together and not overlap the settings.
But when it comes to different devices and profile swaps, I guess I don't need to bother sharing the gradio. 🤔
@GrennKren Is it necessary to consider launching multiple webui sessions at the same time? In this case, referenced files or local storage may conflict.
When I tried to tackle this problem, I could not come up with a way to persist the values of Interfaces such as Textboxes and Buttons created by gradio. It would be possible if the system consisted of just html and js.
Saving settings, either via the server-side or the client-side, would be fantastic for browsers which unload the page in the background to free up RAM, and reload it when you return (Chrome for iOS is a big offender here).
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/842