stable-diffusion-webui
stable-diffusion-webui copied to clipboard
only rewrite ui-config when there is change
- only rewrite ui-config on load when there is change
ui-config.json
is is always rewritten on webui load, even when there's no change
there's no point and can cause file corruption at the inappropriate time during load
and yes I was unlucky enough that this actually happened to me
Changes
- create a copy of the dictionary read from file and compare before writing if there is no change then don't write the file
- a minor typo fix
Checklist:
- [x] I have read contributing wiki page
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines
- [x] My code passes tests