diff options
author | Muhammad Rizqi Nur <rizqinur2010@gmail.com> | 2022-11-02 07:37:22 +0000 |
---|---|---|
committer | Muhammad Rizqi Nur <rizqinur2010@gmail.com> | 2022-11-02 07:37:22 +0000 |
commit | a5409a6e4bc3eaa9757a7505d4564ad8e0d899ea (patch) | |
tree | c4db46d9e357c63aae3fb3e643c8cb9b68440eae /modules/sd_vae.py | |
parent | 056f06d3738c267b1014e6e8e1ef5bd97af1fb45 (diff) | |
download | stable-diffusion-webui-gfx803-a5409a6e4bc3eaa9757a7505d4564ad8e0d899ea.tar.gz stable-diffusion-webui-gfx803-a5409a6e4bc3eaa9757a7505d4564ad8e0d899ea.tar.bz2 stable-diffusion-webui-gfx803-a5409a6e4bc3eaa9757a7505d4564ad8e0d899ea.zip |
Save VAE provided by cmd_opts.vae_path
Diffstat (limited to 'modules/sd_vae.py')
-rw-r--r-- | modules/sd_vae.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 78e14e8a..71e7a6e6 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -78,27 +78,24 @@ def refresh_vae_list(vae_path=vae_path, model_path=model_path): vae_list.extend(default_vae_list) vae_list.extend(list(res.keys())) vae_dict.clear() - vae_dict.update(default_vae_dict) vae_dict.update(res) + vae_dict.update(default_vae_dict) return vae_list def resolve_vae(checkpoint_file, vae_file="auto"): global first_load, vae_dict, vae_list - # save_settings = False - # if vae_file argument is provided, it takes priority + # if vae_file argument is provided, it takes priority, but not saved if vae_file and vae_file not in default_vae_list: if not os.path.isfile(vae_file): vae_file = "auto" - # save_settings = True print("VAE provided as function argument doesn't exist") - # for the first load, if vae-path is provided, it takes priority and failure is reported + # for the first load, if vae-path is provided, it takes priority, saved, and failure is reported if first_load and shared.cmd_opts.vae_path is not None: if os.path.isfile(shared.cmd_opts.vae_path): vae_file = shared.cmd_opts.vae_path - # save_settings = True - # print("Using VAE provided as command line argument") + shared.opts.data['sd_vae'] = get_filename(vae_file) else: print("VAE provided as command line argument doesn't exist") # else, we load from settings |