aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_extra_networks_checkpoints.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-29 22:41:23 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-01-29 22:41:23 +0000
commit847ceae1f71ee13e0a397da048d1bb418e8f36c1 (patch)
tree76a48e5cace3e37b531744cc61f0cdd6864677c5 /modules/ui_extra_networks_checkpoints.py
parent399720dac2543fb4cdbe1022ec1a01f2411b81e2 (diff)
downloadstable-diffusion-webui-gfx803-847ceae1f71ee13e0a397da048d1bb418e8f36c1.tar.gz
stable-diffusion-webui-gfx803-847ceae1f71ee13e0a397da048d1bb418e8f36c1.tar.bz2
stable-diffusion-webui-gfx803-847ceae1f71ee13e0a397da048d1bb418e8f36c1.zip
make it possible to search checkpoint by its hash
Diffstat (limited to 'modules/ui_extra_networks_checkpoints.py')
-rw-r--r--modules/ui_extra_networks_checkpoints.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/ui_extra_networks_checkpoints.py b/modules/ui_extra_networks_checkpoints.py
index a6799171..04097a79 100644
--- a/modules/ui_extra_networks_checkpoints.py
+++ b/modules/ui_extra_networks_checkpoints.py
@@ -14,6 +14,7 @@ class ExtraNetworksPageCheckpoints(ui_extra_networks.ExtraNetworksPage):
shared.refresh_checkpoints()
def list_items(self):
+ checkpoint: sd_models.CheckpointInfo
for name, checkpoint in sd_models.checkpoints_list.items():
path, ext = os.path.splitext(checkpoint.filename)
previews = [path + ".png", path + ".preview.png"]
@@ -28,7 +29,7 @@ class ExtraNetworksPageCheckpoints(ui_extra_networks.ExtraNetworksPage):
"name": checkpoint.name_for_extra,
"filename": path,
"preview": preview,
- "search_term": self.search_terms_from_path(checkpoint.filename),
+ "search_term": self.search_terms_from_path(checkpoint.filename) + " " + (checkpoint.sha256 or ""),
"onclick": '"' + html.escape(f"""return selectCheckpoint({json.dumps(name)})""") + '"',
"local_preview": path + ".png",
}