diff options
author | Aarni Koskela <akx@iki.fi> | 2023-05-09 19:17:58 +0000 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2023-05-09 19:25:39 +0000 |
commit | 3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb (patch) | |
tree | 77b2bea31c0e94ac67fddf86fdc7cba65a24af2c /modules/sd_models.py | |
parent | 8fb16ceb288a93f6ecaa45a0afcb3db718333e3e (diff) | |
download | stable-diffusion-webui-gfx803-3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb.tar.gz stable-diffusion-webui-gfx803-3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb.tar.bz2 stable-diffusion-webui-gfx803-3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb.zip |
Fix up string formatting/concatenation to f-strings where feasible
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 59adc7cc..36f643e1 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -47,7 +47,7 @@ class CheckpointInfo: self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0]
self.hash = model_hash(filename)
- self.sha256 = hashes.sha256_from_cache(self.filename, "checkpoint/" + name)
+ self.sha256 = hashes.sha256_from_cache(self.filename, f"checkpoint/{name}")
self.shorthash = self.sha256[0:10] if self.sha256 else None
self.title = name if self.shorthash is None else f'{name} [{self.shorthash}]'
@@ -69,7 +69,7 @@ class CheckpointInfo: checkpoint_alisases[id] = self
def calculate_shorthash(self):
- self.sha256 = hashes.sha256(self.filename, "checkpoint/" + self.name)
+ self.sha256 = hashes.sha256(self.filename, f"checkpoint/{self.name}")
if self.sha256 is None:
return
|