Skip to content

Commit d950c1e

Browse files
AUTOMATIC1111ruchej
authored andcommitted
Merge pull request AUTOMATIC1111#16169 from AUTOMATIC1111/py-3.9-compatibility
Py 3.9 compatibility
1 parent dc71c69 commit d950c1e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

extensions-builtin/Lora/networks.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import annotations
12
import gradio as gr
23
import logging
34
import os

scripts/xyz_grid.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,10 @@ def apply_size(p, x: str, xs) -> None:
107107

108108

109109
def find_vae(name: str):
110-
match name := name.lower().strip():
111-
case 'auto', 'automatic':
112-
return 'Automatic'
113-
case 'none':
114-
return 'None'
110+
if name := name.strip().lower() in ('auto', 'automatic'):
111+
return 'Automatic'
112+
elif name == 'none':
113+
return 'None'
115114
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')
116115

117116

0 commit comments

Comments
 (0)