From 28cc18cbdf79f49dd14282c1885d4858daf7bb75 Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Tue, 23 Jan 2024 03:34:49 +0900 Subject: [PATCH] add exception in case of the infotext is damaged --- modules/infotext_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/infotext_utils.py b/modules/infotext_utils.py index 5799b01e7..ba50ad7b1 100644 --- a/modules/infotext_utils.py +++ b/modules/infotext_utils.py @@ -386,7 +386,10 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model for key in info_json_keys: if key in res: - res[key] = info_json_loads(res[key]) + try: + res[key] = info_json_loads(res[key]) + except Exception: + print(f'Error parsing "{key}: {res[key]}"') infotext_versions.backcompat(res)