diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 04:52:45 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-10 04:52:45 +0000 |
commit | 762265eab58cdb8f2d6398769bab43d8b8db0075 (patch) | |
tree | 7766901f867d84cf0662b2ae0d5bc55c673a08e8 /modules/sd_models.py | |
parent | a617d6488275a58da0627b3fed5f53593b2eb8b2 (diff) | |
download | stable-diffusion-webui-gfx803-762265eab58cdb8f2d6398769bab43d8b8db0075.tar.gz stable-diffusion-webui-gfx803-762265eab58cdb8f2d6398769bab43d8b8db0075.tar.bz2 stable-diffusion-webui-gfx803-762265eab58cdb8f2d6398769bab43d8b8db0075.zip |
autofixes from ruff
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 36f643e1..11c1a344 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -239,7 +239,7 @@ def read_metadata_from_safetensors(filename): if isinstance(v, str) and v[0:1] == '{':
try:
res[k] = json.loads(v)
- except Exception as e:
+ except Exception:
pass
return res
@@ -467,7 +467,7 @@ def load_model(checkpoint_info=None, already_loaded_state_dict=None): try:
with sd_disable_initialization.DisableInitialization(disable_clip=clip_is_included_into_sd):
sd_model = instantiate_from_config(sd_config.model)
- except Exception as e:
+ except Exception:
pass
if sd_model is None:
@@ -544,7 +544,7 @@ def reload_model_weights(sd_model=None, info=None): try:
load_model_weights(sd_model, checkpoint_info, state_dict, timer)
- except Exception as e:
+ except Exception:
print("Failed to load checkpoint, restoring previous")
load_model_weights(sd_model, current_checkpoint_info, None, timer)
raise
|