From c764cae14d2801c0b3deab301b337caa0e115532 Mon Sep 17 00:00:00 2001 From: Gazzoo-byte <73721238+Gazzoo-byte@users.noreply.github.com> Date: Tue, 25 Apr 2023 23:36:02 +0100 Subject: [PATCH] sd_vae automatic behaviour fix for non-Windows users Hadn't considered that hard-coding the separators would break this for non-Windows users - replaced hard coding with os.sep --- modules/sd_vae.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_vae.py b/modules/sd_vae.py index ea551b140..67c927749 100644 --- a/modules/sd_vae.py +++ b/modules/sd_vae.py @@ -103,7 +103,7 @@ def resolve_vae(checkpoint_file): return vae_near_checkpoint, 'found near the checkpoint' if is_automatic: - for named_vae_location in [vae_path + "\\" + Path(checkpoint_file).stem + ".vae.pt", vae_path + "\\" + Path(checkpoint_file).stem + ".vae.ckpt", vae_path + "\\" + Path(checkpoint_file).stem + ".vae.safetensors"]: + for named_vae_location in [vae_path + os.sep + Path(checkpoint_file).stem + ".vae.pt", vae_path + os.sep + Path(checkpoint_file).stem + ".vae.ckpt", vae_path + os.sep + Path(checkpoint_file).stem + ".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'