From a2b754475342effc339438ae82c3307fa95f5f6a Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 25 Apr 2023 19:14:46 -0400 Subject: [PATCH] cleanup vae messages --- modules/sd_vae.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/sd_vae.py b/modules/sd_vae.py index 62a5ab10a..237dafa4f 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -93,19 +93,18 @@ def find_vae_near_checkpoint(checkpoint_file): def resolve_vae(checkpoint_file): if shared.cmd_opts.vae is not None: - return shared.cmd_opts.vae, 'from commandline argument' + return shared.cmd_opts.vae, 'forced' is_automatic = shared.opts.sd_vae in {"Automatic", "auto"} # "auto" for people with old config vae_near_checkpoint = find_vae_near_checkpoint(checkpoint_file) if vae_near_checkpoint is not None and (shared.opts.sd_vae_as_default): - return vae_near_checkpoint, 'found near the checkpoint' + return vae_near_checkpoint, 'near checkpoint' if is_automatic: for named_vae_location in [os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.pt"), os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.ckpt"), os.path.join(vae_path, os.path.splitext(os.path.basename(checkpoint_file))[0] + ".vae.safetensors")]: if os.path.isfile(named_vae_location): - print(named_vae_location+' found in VAE dir') - return named_vae_location, ' found in VAE dir' + return named_vae_location, 'in VAE dir' if shared.opts.sd_vae == "None": return None, None @@ -115,9 +114,7 @@ def resolve_vae(checkpoint_file): return vae_from_options, 'specified in settings' if not is_automatic: - print(f"Couldn't find VAE named {shared.opts.sd_vae}; using None instead") - - print(f"No matching VAE found, using None instead") + print(f"VAE not found: {shared.opts.sd_vae}") return None, None