diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-03-14 08:22:29 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-03-14 08:22:29 +0000 |
commit | 6a04a7f20fcc4a992ae017b06723e9ceffe17b37 (patch) | |
tree | e02d72a0341312d976ac19a8724944cecbd903d4 /modules/sd_models.py | |
parent | 8b35b64e110fc9f672f73f1cb0fc3ffc809a36c9 (diff) | |
download | stable-diffusion-webui-gfx803-6a04a7f20fcc4a992ae017b06723e9ceffe17b37.tar.gz stable-diffusion-webui-gfx803-6a04a7f20fcc4a992ae017b06723e9ceffe17b37.tar.bz2 stable-diffusion-webui-gfx803-6a04a7f20fcc4a992ae017b06723e9ceffe17b37.zip |
fix an error loading Lora with empty values in metadata
Diffstat (limited to 'modules/sd_models.py')
-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:
|