Skip to content

Commit 6ca7a45

Browse files
committed
Merge pull request AUTOMATIC1111#16169 from AUTOMATIC1111/py-3.9-compatibility
Py 3.9 compatibility
1 parent 780c70f commit 6ca7a45

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
@@ -118,11 +118,10 @@ def apply_size(p, x: str, xs) -> None:
118118

119119

120120
def find_vae(name: str):
121-
match name := name.lower().strip():
122-
case 'auto', 'automatic':
123-
return 'Automatic'
124-
case 'none':
125-
return 'None'
121+
if name := name.strip().lower() in ('auto', 'automatic'):
122+
return 'Automatic'
123+
elif name == 'none':
124+
return 'None'
126125
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')
127126

128127

0 commit comments

Comments
 (0)