diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-09 19:40:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 19:40:51 +0000 |
commit | d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a (patch) | |
tree | 894f00b92caa229dbfaa2d07c16c25e0167412db /modules/sd_models.py | |
parent | ccbb361845bfabfa3fc2c77bb234ea4be0781dd9 (diff) | |
parent | 3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb (diff) | |
download | stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.tar.gz stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.tar.bz2 stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.zip |
Merge pull request #10232 from akx/eff
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
|