aboutsummaryrefslogtreecommitdiffstats
path: root/modules/options.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-01-26 16:04:13 +0000
committerGitHub <noreply@github.com>2024-01-26 16:04:13 +0000
commit4d5db58a3e82b441fa0ca15df0370d49175e2aea (patch)
treeb96f19ce834ccf8b2802fe0c1772e37dfb85670b /modules/options.py
parentc6c9d1227578525385a9e805b4099a07b3440062 (diff)
parent47cf92039b524bb6dad05e96607208b8b9df7ede (diff)
downloadstable-diffusion-webui-gfx803-4d5db58a3e82b441fa0ca15df0370d49175e2aea.tar.gz
stable-diffusion-webui-gfx803-4d5db58a3e82b441fa0ca15df0370d49175e2aea.tar.bz2
stable-diffusion-webui-gfx803-4d5db58a3e82b441fa0ca15df0370d49175e2aea.zip
Merge pull request #14767 from AUTOMATIC1111/minor-fix-to-#14525
minor fix to #14525
Diffstat (limited to 'modules/options.py')
-rw-r--r--modules/options.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/options.py b/modules/options.py
index 503b40e9..35ccade2 100644
--- a/modules/options.py
+++ b/modules/options.py
@@ -198,6 +198,8 @@ class Options:
try:
with open(filename, "r", encoding="utf8") as file:
self.data = json.load(file)
+ except FileNotFoundError:
+ self.data = {}
except Exception:
errors.report(f'\nCould not load settings\nThe config file "{filename}" is likely corrupted\nIt has been moved to the "tmp/config.json"\nReverting config to default\n\n''', exc_info=True)
os.replace(filename, os.path.join(script_path, "tmp", "config.json"))