aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_loadsave.py
diff options
context:
space:
mode:
authorSj-Si <sjw.jetty@gmail.com>2024-01-11 21:37:35 +0000
committerSj-Si <sjw.jetty@gmail.com>2024-01-11 21:37:35 +0000
commit036500223de0a3caaa86360a8ad3ed301e4367b0 (patch)
treef05f0d5fc503d9c35d57bad077a5dab1dfd6569e /modules/ui_loadsave.py
parent0726a6e12e85a37d1e514f5603acf9f058c11783 (diff)
parentcb5b335acddd126d4f6c990982816c06beb0d6ae (diff)
downloadstable-diffusion-webui-gfx803-036500223de0a3caaa86360a8ad3ed301e4367b0.tar.gz
stable-diffusion-webui-gfx803-036500223de0a3caaa86360a8ad3ed301e4367b0.tar.bz2
stable-diffusion-webui-gfx803-036500223de0a3caaa86360a8ad3ed301e4367b0.zip
Merge changes from dev
Diffstat (limited to 'modules/ui_loadsave.py')
-rw-r--r--modules/ui_loadsave.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/ui_loadsave.py b/modules/ui_loadsave.py
index 7826786c..2555cdb6 100644
--- a/modules/ui_loadsave.py
+++ b/modules/ui_loadsave.py
@@ -26,8 +26,9 @@ class UiLoadsave:
self.ui_defaults_review = None
try:
- if os.path.exists(self.filename):
- self.ui_settings = self.read_from_file()
+ self.ui_settings = self.read_from_file()
+ except FileNotFoundError:
+ pass
except Exception as e:
self.error_loading = True
errors.display(e, "loading settings")
@@ -144,7 +145,7 @@ class UiLoadsave:
json.dump(current_ui_settings, file, indent=4, ensure_ascii=False)
def dump_defaults(self):
- """saves default values to a file unless tjhe file is present and there was an error loading default values at start"""
+ """saves default values to a file unless the file is present and there was an error loading default values at start"""
if self.error_loading and os.path.exists(self.filename):
return