studio: sort OOM GGUF variants smallest-to-largest

OOM variants are more useful sorted ascending by size since smaller ones
are more likely to run with --fit. Non-OOM variants remain largest-first
(best quality).
This commit is contained in:
Daniel Han 2026-03-15 06:22:01 +00:00
commit 4600131fea

View file

@ -225,7 +225,8 @@ function GgufVariantExpander({
const bOom = gpuGb != null && gpuGb > 0 && bGb > 0 && checkVramFit(bGb, gpuGb) === "exceeds";
if (aOom !== bOom) return aOom ? 1 : -1;
return b.size_bytes - a.size_bytes;
// Non-OOM: largest first (best quality); OOM: smallest first (most likely to fit)
return aOom ? a.size_bytes - b.size_bytes : b.size_bytes - a.size_bytes;
});
}, [variants, effectiveRecommended, gpuGb]);