From 3ad0ea84198c2a3f89f5a47ab275ec2903f40499 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 26 Jul 2026 10:17:47 +0000 Subject: [PATCH] Send the picked GGUF filename with the quant so diffusion loads fire The variant expander emitted only the quant label, and nothing else in the frontend set ggufFilename, so the Images and Video pages could never take their GGUF branch: both gate it on meta.ggufVariant and meta.ggufFilename, then fall through to the single-file path, which returns because the id is a repo id and not a .gguf name. Every quant pick was a silent dead click, with no load request reaching the backend. The filename was already on the variant row (the picker keys its list on it, and the variant validator requires a non-empty string), so thread it through the click handler. The chat path is unaffected: it reads ggufVariant and never needed the filename. --- .../components/model-selector/pickers.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx index 972fd28ec2..d13d84362c 100644 --- a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx +++ b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx @@ -838,12 +838,17 @@ function GgufVariantExpander({ ); const handleVariantClick = useCallback( - (quant: string, downloaded?: boolean, sizeBytes?: number) => { + // ``filename`` is required, not decorative: the diffusion pages load a quant with + // {kind: "gguf", filename} and gate that branch on meta.ggufFilename, so emitting the + // quant label alone made every Images/Video GGUF quant pick a dead click (the id is a + // repo id, so the single-file fallback rejects it and returns). + (quant: string, filename: string, downloaded?: boolean, sizeBytes?: number) => { const isAvailable = isLocalPath || downloaded === true; onSelect(repoId, { source: sourceOverride ?? (isLocalPath ? "local" : "hub"), isLora: false, ggufVariant: quant, + ggufFilename: filename, isDownloaded: isLocalPath ? true : downloaded, expectedBytes: sizeBytes, contextLength: isAvailable ? nativeContext : undefined, @@ -1012,7 +1017,12 @@ function GgufVariantExpander({ type="button" {...variantList.getOptionProps(variantOptionKey, false)} onClick={() => - handleVariantClick(v.quant, v.downloaded, expectedBytes) + handleVariantClick( + v.quant, + v.filename, + v.downloaded, + expectedBytes, + ) } className={cn( "flex min-w-0 flex-1 items-center justify-between gap-2 rounded-full py-1 pl-2 pr-1.5 text-left text-sm transition-colors hover:bg-[#ececec] focus-visible:bg-[#ececec] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring dark:hover:bg-[var(--sidebar-accent)] dark:focus-visible:bg-[var(--sidebar-accent)]",