fix: image model ranking crashes when system is not a dict (#1900)

This commit is contained in:
Afonso Coutinho
2026-06-04 03:23:59 +01:00
committed by GitHub
parent be8f1fac85
commit 5043b2924c
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -280,6 +280,8 @@ def rank_image_models(system, search=None, sort="fit"):
Returns list of models with fit info (vram needed, fits, recommended quant).
"""
if not isinstance(system, dict):
system = {}
gpu_vram = system.get("gpu_vram_gb", 0) or 0
has_gpu = system.get("has_gpu", False)
results = []