Backends: Probably fix sorting

This commit is contained in:
somebody
2023-07-24 10:28:22 -05:00
parent 81e4c8a807
commit 2fb877db40

View File

@@ -6292,7 +6292,7 @@ def UI_2_select_model(data):
#so we'll just go through all the possible loaders
for model_backend in sorted(
model_backends,
key=lambda x: model_backend_module_names[x] in PRIORITIZED_BACKEND_MODULES,
key=lambda x: PRIORITIZED_BACKEND_MODULES.get(model_backend_module_names[x], 0),
reverse=True,
):
if model_backends[model_backend].is_valid(data["name"], data["path"] if 'path' in data else None, data["menu"]):