diff options
author | Brad Smith <bradster@infinitewarp.com> | 2023-03-06 18:18:35 +0000 |
---|---|---|
committer | Brad Smith <bradster@infinitewarp.com> | 2023-03-06 18:21:42 +0000 |
commit | d118cb6ea3f1a410b5e030519dc021eafc1d6b52 (patch) | |
tree | 7775faf967c7b03ff310f4cf51c194a0973baf1c /modules/modelloader.py | |
parent | b15bc73c99e6fbbeffdbdbeab39ba30276021d4b (diff) | |
download | stable-diffusion-webui-gfx803-d118cb6ea3f1a410b5e030519dc021eafc1d6b52.tar.gz stable-diffusion-webui-gfx803-d118cb6ea3f1a410b5e030519dc021eafc1d6b52.tar.bz2 stable-diffusion-webui-gfx803-d118cb6ea3f1a410b5e030519dc021eafc1d6b52.zip |
use lowercase name for sorting; keep `UpscalerLanczos` and `UpscalerNearest` at the start of the list with `UpscalerNone`
Co-authored-by: catboxanon <122327233+catboxanon@users.noreply.github.com>
Diffstat (limited to 'modules/modelloader.py')
-rw-r--r-- | modules/modelloader.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/modelloader.py b/modules/modelloader.py index a7ac338c..e351d808 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -6,7 +6,7 @@ from urllib.parse import urlparse from basicsr.utils.download_util import load_file_from_url from modules import shared -from modules.upscaler import Upscaler, UpscalerNone +from modules.upscaler import Upscaler, UpscalerLanczos, UpscalerNearest, UpscalerNone from modules.paths import script_path, models_path @@ -172,5 +172,5 @@ def load_upscalers(): shared.sd_upscalers = sorted( datas, # Special case for UpscalerNone keeps it at the beginning of the list. - key=lambda x: x.name if not isinstance(x.scaler, UpscalerNone) else "" + key=lambda x: x.name.lower() if not isinstance(x.scaler, (UpscalerNone, UpscalerLanczos, UpscalerNearest)) else "" ) |