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

only rewrite ui-config when there is change

Open w-e-w opened this issue 7 months ago • 0 comments

  • 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:

w-e-w avatar Dec 18 '23 06:12 w-e-w