From dcd6666f8d3ed00c23a9ebba5612519b5da4f900 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sat, 11 Jul 2026 18:36:31 +0000 Subject: [PATCH] Thread the task-scoped GGUF fit budget through every picker expander The previous commit introduced the single-device budget but wired it into only the downloaded-group and Hub search sites. The LM Studio, custom-folder, local-dir, live-search and exported-GGUF expanders reachable from the Images/Video pickers still measured against the summed multi-GPU total, as did the size-based GGUF row badge, so those paths could still recommend a quant that OOMs on a single device. All GgufVariantExpander call sites in HubModelPicker now share expanderGpuGb, and the row badge derives the same task-scoped budget. --- .../assistant-ui/model-selector/pickers.tsx | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx index f81884eb2d..6df5e41380 100644 --- a/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx +++ b/studio/frontend/src/components/assistant-ui/model-selector/pickers.tsx @@ -2217,7 +2217,9 @@ export function HubModelPicker({ sizeBytes != null && !fitsDevice({ sizeBytes, - gpuGb: gpu.memoryTotalGb, + // Same task-scoped budget as expanderGpuGb: single device for + // Images/Video (one-device pipelines), summed total for chat. + gpuGb: task ? gpu.maxDeviceMemoryGb : gpu.memoryTotalGb, systemRamGb: gpu.systemRamAvailableGb, }); map.set(r.id, { @@ -3989,9 +3991,7 @@ export function HubModelPicker({ onNavigatePastEnd={() => hubModelList.moveFocus(optionKey, "next") } - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} systemRamGb={gpu.systemRamAvailableGb || undefined} /> )} @@ -4080,9 +4080,7 @@ export function HubModelPicker({ onNavigatePastEnd={() => hubModelList.moveFocus(optionKey, "next") } - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} systemRamGb={gpu.systemRamAvailableGb || undefined} /> )} @@ -4161,9 +4159,7 @@ export function HubModelPicker({ onNavigatePastEnd={() => hubModelList.moveFocus(optionKey, "next") } - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} systemRamGb={gpu.systemRamAvailableGb || undefined} /> )} @@ -4261,9 +4257,7 @@ export function HubModelPicker({ }} vramStatus={info?.status ?? null} vramEst={info?.est} - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} onArrowDownIntoChildren={ expandedGguf === id ? () => focusFirstChildOption(optionKey) @@ -4282,9 +4276,7 @@ export function HubModelPicker({ onNavigatePastEnd={() => hubModelList.moveFocus(optionKey, "next") } - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} systemRamGb={gpu.systemRamAvailableGb || undefined} variantActions={{ onDelete: async (quant) => { @@ -4375,9 +4367,7 @@ export function HubModelPicker({ onNavigatePastEnd={() => hubModelList.moveFocus(optionKey, "next") } - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} systemRamGb={gpu.systemRamAvailableGb || undefined} variantActions={{ onDelete: async (quant) => { @@ -4441,9 +4431,7 @@ export function HubModelPicker({ isSearchGguf ? null : (vram?.status ?? null) } vramEst={isSearchGguf ? undefined : vram?.est} - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} onArrowDownIntoChildren={ expandedGguf === id ? () => { @@ -4466,9 +4454,7 @@ export function HubModelPicker({ onNavigatePastEnd={() => hubModelList.moveFocus(optionKey, "next") } - gpuGb={ - gpu.available ? gpu.memoryTotalGb : undefined - } + gpuGb={expanderGpuGb} systemRamGb={gpu.systemRamAvailableGb || undefined} variantActions={{ onDelete: async (quant) => {