aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorunknown <mcgpapu@gmail.com>2023-01-30 05:12:31 -0600
committerunknown <mcgpapu@gmail.com>2023-01-30 05:12:31 -0600
commit21766a0898fd9cc344c5d100396280fa8b0c4e74 (patch)
tree2a365bb6bc60c9916004e67c04f3816880366edf /modules/sd_models.py
parente79b7db4b47a33889551b9266ee3277879d4f560 (diff)
parentaa4688eb8345de583070ca9ddb4c6f585f06762b (diff)
Merge branch 'master' of github.com:AUTOMATIC1111/stable-diffusion-webui into gamepad
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index b2d48a51..300387a9 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -41,6 +41,7 @@ class CheckpointInfo:
name = name[1:]
self.name = name
+ self.name_for_extra = os.path.splitext(os.path.basename(filename))[0]
self.model_name = os.path.splitext(name.replace("/", "_").replace("\\", "_"))[0]
self.hash = model_hash(filename)
@@ -231,12 +232,10 @@ def get_checkpoint_state_dict(checkpoint_info: CheckpointInfo, timer):
def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer):
- title = checkpoint_info.title
sd_model_hash = checkpoint_info.calculate_shorthash()
timer.record("calculate hash")
- if checkpoint_info.title != title:
- shared.opts.data["sd_model_checkpoint"] = checkpoint_info.title
+ shared.opts.data["sd_model_checkpoint"] = checkpoint_info.title
if state_dict is None:
state_dict = get_checkpoint_state_dict(checkpoint_info, timer)