aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-08-04 12:01:28 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-08-04 14:01:22 +0900
commit7f1d087cba681ddd12cd54152090b176f26bd25c (patch)
tree9e605ab3afe9aaec09cb81d5ed3b2b4c1fdf9dd0 /modules
parent09c1be96748584b08b6299024bb7b64bafb09d09 (diff)
sort VAE
Diffstat (limited to 'modules')
-rw-r--r--modules/sd_vae.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/sd_vae.py b/modules/sd_vae.py
index e4ff2994..84271db0 100644
--- a/modules/sd_vae.py
+++ b/modules/sd_vae.py
@@ -50,6 +50,7 @@ def get_filename(filepath):
def refresh_vae_list():
+ global vae_dict
vae_dict.clear()
paths = [
@@ -83,6 +84,8 @@ def refresh_vae_list():
name = get_filename(filepath)
vae_dict[name] = filepath
+ vae_dict = dict(sorted(vae_dict.items(), key=lambda item: shared.natural_sort_key(item[0])))
+
def find_vae_near_checkpoint(checkpoint_file):
checkpoint_path = os.path.basename(checkpoint_file).rsplit('.', 1)[0]