Commit 21e72d1a authored by w-e-w's avatar w-e-w

py 3.9 find_vae()

parent 1da49079
......@@ -118,11 +118,10 @@ def apply_size(p, x: str, xs) -> None:
def find_vae(name: str):
match name := name.lower().strip():
case 'auto', 'automatic':
return 'Automatic'
case 'none':
return 'None'
if name := name.strip().lower() in ('auto', 'automatic'):
return 'Automatic'
elif name == 'none':
return 'None'
return next((k for k in modules.sd_vae.vae_dict if k.lower() == name), print(f'No VAE found for {name}; using Automatic') or 'Automatic')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment