未验证 提交 09165916 编写于 作者: A AUTOMATIC1111 提交者: GitHub

Merge pull request #12297 from AUTOMATIC1111/sort-VAE

sort VAE
...@@ -50,6 +50,7 @@ def get_filename(filepath): ...@@ -50,6 +50,7 @@ def get_filename(filepath):
def refresh_vae_list(): def refresh_vae_list():
global vae_dict
vae_dict.clear() vae_dict.clear()
paths = [ paths = [
...@@ -83,6 +84,8 @@ def refresh_vae_list(): ...@@ -83,6 +84,8 @@ def refresh_vae_list():
name = get_filename(filepath) name = get_filename(filepath)
vae_dict[name] = 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): def find_vae_near_checkpoint(checkpoint_file):
checkpoint_path = os.path.basename(checkpoint_file).rsplit('.', 1)[0] checkpoint_path = os.path.basename(checkpoint_file).rsplit('.', 1)[0]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册