Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort VAE #12297

Merged
merged 1 commit into from
Aug 4, 2023
Merged

sort VAE #12297

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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