@@ -78,27 +78,24 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path):
78
78
vae_list .extend (default_vae_list )
79
79
vae_list .extend (list (res .keys ()))
80
80
vae_dict .clear ()
81
- vae_dict .update (default_vae_dict )
82
81
vae_dict .update (res )
82
+ vae_dict .update (default_vae_dict )
83
83
return vae_list
84
84
85
85
86
86
def resolve_vae (checkpoint_file , vae_file = "auto" ):
87
87
global first_load , vae_dict , vae_list
88
- # save_settings = False
89
88
90
- # if vae_file argument is provided, it takes priority
89
+ # if vae_file argument is provided, it takes priority, but not saved
91
90
if vae_file and vae_file not in default_vae_list :
92
91
if not os .path .isfile (vae_file ):
93
92
vae_file = "auto"
94
- # save_settings = True
95
93
print ("VAE provided as function argument doesn't exist" )
96
- # for the first load, if vae-path is provided, it takes priority and failure is reported
94
+ # for the first load, if vae-path is provided, it takes priority, saved, and failure is reported
97
95
if first_load and shared .cmd_opts .vae_path is not None :
98
96
if os .path .isfile (shared .cmd_opts .vae_path ):
99
97
vae_file = shared .cmd_opts .vae_path
100
- # save_settings = True
101
- # print("Using VAE provided as command line argument")
98
+ shared .opts .data ['sd_vae' ] = get_filename (vae_file )
102
99
else :
103
100
print ("VAE provided as command line argument doesn't exist" )
104
101
# else, we load from settings
0 commit comments