diff options
-rw-r--r-- | modules/sd_models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 5f57ec0c..f0cb1240 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -225,7 +225,7 @@ def read_metadata_from_safetensors(filename): res = {}
for k, v in json_obj.get("__metadata__", {}).items():
res[k] = v
- if isinstance(v, str) and v[0] == '{':
+ if isinstance(v, str) and v[0:1] == '{':
try:
res[k] = json.loads(v)
except Exception as e:
|