diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2024-03-02 04:03:13 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2024-03-02 04:03:13 +0000 |
commit | bef51aed032c0aaa5cfd80445bc4cf0d85b408b5 (patch) | |
tree | 42957c454a4ac8d98488f19811b60359d05d88ba /modules/ui_loadsave.py | |
parent | cf2772fab0af5573da775e7437e6acdca424f26e (diff) | |
parent | 13984857890401e8605a3e53bd671e900a18d73f (diff) | |
download | stable-diffusion-webui-gfx803-bef51aed032c0aaa5cfd80445bc4cf0d85b408b5.tar.gz stable-diffusion-webui-gfx803-bef51aed032c0aaa5cfd80445bc4cf0d85b408b5.tar.bz2 stable-diffusion-webui-gfx803-bef51aed032c0aaa5cfd80445bc4cf0d85b408b5.zip |
Merge branch 'release_candidate'
Diffstat (limited to 'modules/ui_loadsave.py')
-rw-r--r-- | modules/ui_loadsave.py | 7 |
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
|