mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-04 11:12:35 +00:00
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>
This commit is contained in:
@@ -6,7 +6,7 @@ from urllib.parse import urlparse
|
|||||||
|
|
||||||
from basicsr.utils.download_util import load_file_from_url
|
from basicsr.utils.download_util import load_file_from_url
|
||||||
from modules import shared
|
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
|
from modules.paths import script_path, models_path
|
||||||
|
|
||||||
|
|
||||||
@@ -172,5 +172,5 @@ def load_upscalers():
|
|||||||
shared.sd_upscalers = sorted(
|
shared.sd_upscalers = sorted(
|
||||||
datas,
|
datas,
|
||||||
# Special case for UpscalerNone keeps it at the beginning of the list.
|
# 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 ""
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user