Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

studio: sort GGUF quants largest-first so best quality that fits is at the top

Daniel Handd2d979b408f
diff --git a/studio/backend/utils/models/model_config.py b/studio/backend/utils/models/model_config.py
index 6ddea6ea0ba..72cbc40cd31 100644
--- a/studio/backend/utils/models/model_config.py
+++ b/studio/backend/utils/models/model_config.py
@@ -969,8 +969,9 @@ def list_gguf_variants(
def _sort_key(v: GgufVariantInfo) -> tuple:
is_recommended = v.quant == best_quant
is_ud = v.quant.startswith("UD-")
- # (0, ...) recommended | (1, 0, size) other UD | (1, 1, size) non-UD
- return (0 if is_recommended else 1, 0 if is_ud else 1, v.size_bytes)
+ # (0, ...) recommended | (1, 0, -size) other UD | (1, 1, -size) non-UD
+ # Negative size so largest (best quality) appears first.
+ return (0 if is_recommended else 1, 0 if is_ud else 1, -v.size_bytes)
variants.sort(key = _sort_key)