mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
Merge pull request #16169 from AUTOMATIC1111/py-3.9-compatibility
Py 3.9 compatibility
This commit is contained in:
parent
780c70f6ea
commit
6ca7a453d4
@ -1,3 +1,4 @@
|
|||||||
|
from __future__ import annotations
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -118,11 +118,10 @@ 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'
|
elif name == 'none':
|
||||||
case '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')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user