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

Add Reload CSS button

Open space-nuko opened this issue 2 years ago • 4 comments

Describe what this pull request is trying to achieve.

Adds a Reload CSS button to the settings page. Allows changing webui's style.css or extension CSS without needing to restart the entire webui

Additional notes and description of your changes

The CSS is saved in the backend too, so it will be preserved the page is reloaded

Environment this was tested in

List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.

  • OS: Windows
  • Browser: Chrome
  • Graphics card: NVIDIA RTX 3090

Screenshots or videos of your changes 2023-03-25 15_14_34-Stable Diffusion - Chromium

space-nuko avatar Mar 25 '23 19:03 space-nuko

Actions might be a better place for this. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/2f129ef490e175943dd50163015dd1e6fc8d49f0/modules/ui.py#L1526-L1532 Or down at the bottom next to Reload UI. https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/64da5c46ef0d68b9048747c2e0d46ce3495f9f29/html/footer.html#L8

missionfloyd avatar Mar 26 '23 04:03 missionfloyd

I think a better solution would be to refer to independent css files as they are on disk, same as it's done with javascript, so that there is necessity to do anything serverside to update them.

If not, then yes, I also think the button should be in Actions.

AUTOMATIC1111 avatar Mar 27 '23 04:03 AUTOMATIC1111

See #8942

AUTOMATIC1111 avatar Mar 27 '23 10:03 AUTOMATIC1111

Since the change for independent css files is merged in #9031 and this is incompatible with it, I'm closing the PR.

AUTOMATIC1111 avatar Apr 29 '23 15:04 AUTOMATIC1111