From 99a64edea8d77a609613b86f1a13bc749bd84374 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 19 Aug 2023 08:31:06 +0300 Subject: [PATCH] do not assign to vae_dict --- modules/sd_vae.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 4b98b3c2..dbade067 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -70,7 +70,6 @@ def get_filename(filepath): def refresh_vae_list(): - global vae_dict vae_dict.clear() paths = [ @@ -104,7 +103,7 @@ 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]))) + vae_dict.update(dict(sorted(vae_dict.items(), key=lambda item: shared.natural_sort_key(item[0])))) def find_vae_near_checkpoint(checkpoint_file):