mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
cleanup vae messages
This commit is contained in:
+4
-7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user