mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Update sd_vae.py
There is no need to use split.
This commit is contained in:
parent
749a93295e
commit
1dcd672324
@ -88,10 +88,9 @@ def refresh_vae_list():
|
|||||||
|
|
||||||
|
|
||||||
def find_vae_near_checkpoint(checkpoint_file):
|
def find_vae_near_checkpoint(checkpoint_file):
|
||||||
checkpoint_path = os.path.basename(checkpoint_file).split('.', 1)[0]
|
checkpoint_path = os.path.basename(checkpoint_file).rsplit('.', 1)[0]
|
||||||
for vae_file in vae_dict.values():
|
for vae_file in vae_dict.values():
|
||||||
vae_path = os.path.basename(vae_file).split('.', 1)[0]
|
if os.path.basename(vae_file).startswith(checkpoint_path):
|
||||||
if vae_path == checkpoint_path:
|
|
||||||
return vae_file
|
return vae_file
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user