Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#12297 from AUTOMATIC1111/sort-VAE
Browse files Browse the repository at this point in the history
sort VAE
  • Loading branch information
AUTOMATIC1111 authored and brkirch committed Aug 4, 2023
2 parents abf84d2 + 7f1d087 commit 5948b3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/sd_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def get_filename(filepath):


def refresh_vae_list():
global vae_dict
vae_dict.clear()

paths = [
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 5948b3a

Please sign in to comment.