Commit bad47dcf authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #16169 from AUTOMATIC1111/py-3.9-compatibility

Py 3.9 compatibility
parents 1da49079 c3d8b78b
from __future__ import annotations
import gradio as gr import gradio as gr
import logging import logging
import os import os
......
...@@ -118,10 +118,9 @@ def apply_size(p, x: str, xs) -> None: ...@@ -118,10 +118,9 @@ def apply_size(p, x: str, xs) -> None:
def find_vae(name: str): def find_vae(name: str):
match name := name.lower().strip(): if name := name.strip().lower() in ('auto', 'automatic'):
case 'auto', 'automatic':
return 'Automatic' return 'Automatic'
case 'none': elif name == 'none':
return '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') 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