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
This commit is contained in:
Gazzoo-byte
2023-04-25 23:36:02 +01:00
committed by GitHub
parent 8c562941ad
commit c764cae14d
+1 -1
View File
@@ -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'