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.
This commit is contained in:
parent
9eed2bdfa3
commit
3ad0ea8419
1 changed files with 12 additions and 2 deletions
|
|
@ -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)]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue