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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: read a model picker row at a glance (#8658)
Michael Han8d0edc1a4d4a
diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.pyindex d1a22bb2a75..2475eb33c7d 100644--- a/studio/backend/routes/inference.py+++ b/studio/backend/routes/inference.py@@ -11461,9 +11461,7 @@ async def _proxy_to_external_provider(# Model-aware: Gemini's image models drop the function catalog inside the# native translator, so entering the loop for them would advertise tools# the model is never shown and finish as if none were selected.- provider_model_runs_local_tools(- provider_type, payload.external_model or payload.model- )+ provider_model_runs_local_tools(provider_type, payload.external_model or payload.model)and payload.stream is Trueand _explicit_studio_tool_loop_requested(payload)# A selection of purely hosted names is the provider's tool envelope, notdiff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsxindex 2945a282c33..41b86649810 100644--- a/studio/frontend/src/features/chat/chat-page.tsx+++ b/studio/frontend/src/features/chat/chat-page.tsx@@ -70,7 +70,6 @@ import {NativeAttachmentTargetContext,NativeModelChip,NativeModelDropOverlay,- useChooseNativeModel,useNativeIntentStore,useNativeModelDrop,useNativePathLeasesSupported,@@ -2623,26 +2622,6 @@ export function ChatPage({),[hasActiveModel, loadNativeModelIntent],);- const handleNativeModelPickerAutoLoad = useCallback(- (intent: NativeIntent) =>- loadNativeModelIntent(intent, "Loading chosen local GGUF model."),- [loadNativeModelIntent],- );- const canAutoLoadPickedNativeModel = useCallback(() => {- const store = useChatRuntimeStore.getState();- return (- view.mode === "single" &&- nativePathLeasesSupported &&- !loadingModel &&- !modelLoading &&- !store.modelLoading &&- !store.params.checkpoint- );- }, [loadingModel, modelLoading, nativePathLeasesSupported, view.mode]);- const chooseNativeModel = useChooseNativeModel({- shouldAutoLoad: canAutoLoadPickedNativeModel,- onAutoLoad: handleNativeModelPickerAutoLoad,- });// Dropped documents go to the thread bar, which owns the RAG upload and can// materialize a thread id for a chat that hasn't been sent to yet.const handleNativeAttachmentDrop = useCallback(@@ -3398,7 +3377,6 @@ export function ChatPage({onValueChange={handleCheckpointChange}onEject={handleEject}onFoldersChange={refreshLocalModels}- onPickLocalModel={isTauri ? chooseNativeModel : undefined}onModelsChange={refreshModelLists}deleteDisabled={modelOperationInProgress}variant="ghost"diff --git a/studio/frontend/src/features/hub/lib/unsloth-support.ts b/studio/frontend/src/features/hub/lib/unsloth-support.tsindex bd4318b204b..3235c03e1f5 100644--- a/studio/frontend/src/features/hub/lib/unsloth-support.ts+++ b/studio/frontend/src/features/hub/lib/unsloth-support.ts@@ -31,6 +31,7 @@ const UNSUPPORTED_PIPELINE_TAGS: ReadonlySet<string> = new Set(["text-to-video","video-to-video","image-to-video",+ "image-text-to-video","video-text-to-text","video-classification","unconditional-image-generation",@@ -144,6 +145,7 @@ const IMAGE_PAGE_TASKS: ReadonlySet<string> = new Set([const VIDEO_PAGE_TASKS: ReadonlySet<string> = new Set(["text-to-video","image-to-video",+ "image-text-to-video",]);/** Which Studio page runs this pipeline task, if any. */diff --git a/studio/frontend/src/features/model-picker/components/model-selector.tsx b/studio/frontend/src/features/model-picker/components/model-selector.tsxindex 51c369a315d..7ac642dc747 100644--- a/studio/frontend/src/features/model-picker/components/model-selector.tsx+++ b/studio/frontend/src/features/model-picker/components/model-selector.tsx@@ -20,7 +20,6 @@ import {CloudIcon,DashboardSquare01Icon,Download01Icon,- FolderSearchIcon,RemoveCircleIcon,StarIcon,} from "@hugeicons/core-free-icons";@@ -163,7 +162,6 @@ interface ModelSelectorProps {resolveDownloadFootprint?: ModelDownloadFootprintResolver;onEject?: () => void;onFoldersChange?: () => void;- onPickLocalModel?: () => void | Promise<void>;onModelsChange?: (deletedModel?: DeletedModelRef) => void;deleteDisabled?: boolean;variant?: "outline" | "ghost" | "muted";@@ -362,7 +360,6 @@ function ModelSelectorContent({resolveDownloadFootprint,onEject,onFoldersChange,- onPickLocalModel,onBrowseHub,onModelsChange,deleteDisabled,@@ -388,7 +385,6 @@ function ModelSelectorContent({resolveDownloadFootprint?: ModelDownloadFootprintResolver;onEject?: () => void;onFoldersChange?: () => void;- onPickLocalModel?: () => void;onBrowseHub?: () => void;onModelsChange?: (deletedModel?: DeletedModelRef) => void;deleteDisabled?: boolean;@@ -627,20 +623,6 @@ function ModelSelectorContent({/>}/>-- {onPickLocalModel ? (- <div className="mt-1.5 border-t border-border/70 pt-1.5">- <button- type="button"- onClick={onPickLocalModel}- className="flex w-full items-center justify-center gap-1.5 rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-muted/60"- title={t("picker.pickModelFile")}- >- <HugeiconsIcon icon={FolderSearchIcon} className="size-3.5" />- {t("picker.pickModelFile")}- </button>- </div>- ) : null}</>)}</TooltipProvider>@@ -666,7 +648,6 @@ export function ModelSelector({resolveDownloadFootprint,onEject,onFoldersChange,- onPickLocalModel,onModelsChange,deleteDisabled,variant = "outline",@@ -806,11 +787,6 @@ export function ModelSelector({setOpen(false);}- function handlePickLocalModel() {- setOpen(false);- void onPickLocalModel?.();- }-function handleBrowseHub() {setOpen(false);void navigate({ to: "/hub", search: { tab: "discover" } });@@ -846,7 +822,6 @@ export function ModelSelector({resolveDownloadFootprint={resolveDownloadFootprint}onEject={onEject ? handleEject : undefined}onFoldersChange={onFoldersChange}- onPickLocalModel={onPickLocalModel ? handlePickLocalModel : undefined}// A curated task picker (Images / Video) is self-contained, so it omits this.// A community-enabled one (Audio) already lists past unsloth, so it keeps it.onBrowseHub={diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-capabilities.ts b/studio/frontend/src/features/model-picker/components/model-selector/model-capabilities.tsindex 14bc2c03cab..4c1036fc9c7 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/model-capabilities.ts+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-capabilities.ts@@ -1,14 +1,18 @@// SPDX-License-Identifier: AGPL-3.0-only// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0-// Pure helpers that infer what a model can do (vision / reasoning / audio) from-// its HF tags + pipeline tag, falling back to repo-name keywords. No React/DOM-// deps so they stay easy to test.+// Pure helpers that infer what a model can do (vision / reasoning / audio / media+// generation) from its HF tags + pipeline tag, falling back to repo-name keywords.+// No React/DOM deps so they stay easy to test.export interface ModelCapabilities {vision: boolean;reasoning: boolean;audio: boolean;+ /** Generates images. `vision` is the opposite direction: reading them. */+ imageGen: boolean;+ /** Generates video. */+ videoGen: boolean;}// Authoritative HF pipeline tags / tags for each capability.@@ -30,6 +34,22 @@ const AUDIO_TAGS = new Set(["audio-classification",]);const REASONING_TAGS = new Set(["reasoning"]);+const IMAGE_GEN_TAGS = new Set([+ "text-to-image",+ "image-to-image",+ // The Images picker's own IMAGE_GEN_TASKS accepts this, so a row it lists has to draw the glyph.+ "image-text-to-image",+ "inpainting",+]);+// Every tag here must be one the Video page can run, or a row draws a glyph promising something+// no page in Studio delivers. video-to-video is deliberately absent: the backend takes a prompt+// and reference IMAGES (routes/video.py), never a source video, so such a model has nowhere to go.+const VIDEO_GEN_TAGS = new Set([+ "text-to-video",+ "image-to-video",+ // What MiniMax-H3 is tagged with on the Hub: a frame plus a prompt in, video out.+ "image-text-to-video",+]);// Repo-name fallbacks, bounded so we never read a token out of a longer word.const SEP = "(?:^|[-_/. ])";@@ -46,6 +66,23 @@ const AUDIO_NAME_RE = new RegExp(`${SEP}(?:whisper|asr|tts|parakeet|parler|musicgen|bark|orpheus|csm|voice|speech|audio)${END}`,"i",);+// Families, not the word "image": a local GGUF carries no tags, and "Z-Image-Turbo-GGUF" has to+// read as an image generator from its name alone. Video is matched FIRST below, since+// "HunyuanVideo" and "hunyuanimage" share a stem and the video families are the narrower set.+//+// These end on a letter boundary rather than END: a family stem runs straight into its version+// ("flux1", "sd3", "Wan2.2"), so what must not follow is more WORD. Without it "fluxion-7b",+// "ltxtra-2b" and "SVDQuant" all read as generators.+const FAMILY_END = "(?![a-z])";+const IMAGE_GEN_NAME_RE = new RegExp(+ `${SEP}(?:flux|sdxl|sd3|stable[-_]?diffusion|z[-_]?image|qwen[-_]?image|hidream|ideogram|lumina|hunyuanimage|krea|kolors|playground|pixart)${FAMILY_END}`,+ "i",+);+const VIDEO_GEN_NAME_RE = new RegExp(+ // cogvideox keeps its trailing letter: it is part of the family name, not another word.+ `${SEP}(?:wan\\d|ltx|hunyuanvideo|minimax[-_]?h\\d|cogvideox?|mochi|animatediff|svd|zeroscope)${FAMILY_END}`,+ "i",+);function hasAny(tagSet: Set<string>, wanted: Set<string>): boolean {for (const tag of wanted) if (tagSet.has(tag)) return true;@@ -61,14 +98,19 @@ export function detectCapabilities(opts: {const { id, tags, pipelineTag } = opts;const tagSet = new Set((tags ?? []).map((t) => t.toLowerCase()));if (pipelineTag) tagSet.add(pipelineTag.toLowerCase());+ // Name part only. These two match model FAMILIES, and a family word turns up in owners too:+ // "hunyuanvideo-community/HunyuanImage-2.1" is an image model published by a video org, and+ // matching the whole id badges it as video.+ const name = id.split("/").pop() ?? id;+ const videoGen = hasAny(tagSet, VIDEO_GEN_TAGS) || VIDEO_GEN_NAME_RE.test(name);return {vision: hasAny(tagSet, VISION_TAGS) || VISION_NAME_RE.test(id),reasoning: hasAny(tagSet, REASONING_TAGS) || REASONING_NAME_RE.test(id),audio: hasAny(tagSet, AUDIO_TAGS) || AUDIO_NAME_RE.test(id),+ // A video model is not also an image model. Several ship a text-to-image tag for their+ // first-frame path, and both badges on one row says less than the video one alone.+ imageGen:+ !videoGen && (hasAny(tagSet, IMAGE_GEN_TAGS) || IMAGE_GEN_NAME_RE.test(name)),+ videoGen,};}--/** True when at least one capability is present (worth rendering a badge). */-export function hasAnyCapability(caps: ModelCapabilities): boolean {- return caps.vision || caps.reasoning || caps.audio;-}diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.ts b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.tsindex d0ddfb19597..0f5d1dbf9e2 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.ts+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.ts@@ -20,7 +20,9 @@ import {catalogGroupFitsDevice,catalogToModelOptions,classifyGgufFit,+ curatedArtifactFitsDevice,curatedDisplayNameFor,+ curatedRowLabelFor,groupForRepoId,groupMatchesQuery,loadSpecFor,@@ -241,6 +243,155 @@ assert.equal("MiniMax H3 (GGUF)",);+// ── curatedRowLabelFor ─────────────────────────────────────────────────────────+// The row form: format (and a resolution when that is the only difference) become chips, and only+// what actually names the variant stays in brackets.++assert.deepEqual(curatedRowLabelFor("MiniMaxAI/MiniMax-H3", VIDEO_CATALOG), {+ name: "MiniMax H3",+ tags: ["BF16"],+});+// GGUF is spelled by the repo name, like a text model's row, so no chip repeats it.+assert.deepEqual(curatedRowLabelFor("unsloth/MiniMax-H3-GGUF", VIDEO_CATALOG), {+ name: "MiniMax-H3-GGUF",+ tags: [],+});+assert.deepEqual(curatedRowLabelFor("unsloth/Z-Image-Turbo-GGUF", IMAGE_CATALOG), {+ name: "Z-Image-Turbo-GGUF",+ tags: [],+});+// Every GGUF row ends in the suffix, whoever published it.+for (const catalog of [IMAGE_CATALOG, VIDEO_CATALOG, AUDIO_CATALOG]) {+ for (const group of catalog) {+ for (const artifact of group.artifacts) {+ if (artifact.format !== "gguf") continue;+ const row = curatedRowLabelFor(artifact.repoId, catalog);+ assert.ok(row?.name.endsWith("-GGUF"), `${artifact.repoId} row reads "${row?.name}"`);+ assert.deepEqual(row?.tags, []);+ }+ }+}+// A label part that is not a format or a resolution names the variant, so it stays in the name.+assert.deepEqual(+ curatedRowLabelFor("HiDream-ai/HiDream-I1-Dev", IMAGE_CATALOG),+ { name: "HiDream I1 (Dev (distilled))", tags: ["BF16"] },+);+assert.deepEqual(+ curatedRowLabelFor(+ "hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-720p_t2v",+ VIDEO_CATALOG,+ ),+ { name: "HunyuanVideo 1.5", tags: ["BF16", "720p"] },+);+assert.deepEqual(+ curatedRowLabelFor(+ "hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v",+ VIDEO_CATALOG,+ ),+ { name: "HunyuanVideo 1.5", tags: ["BF16", "480p"] },+);+// One artifact means nothing to tell apart, so the row stays bare.+assert.deepEqual(curatedRowLabelFor("Lightricks/LTX-2", VIDEO_CATALOG), {+ name: "LTX 2 (base)",+ tags: [],+});+assert.equal(curatedRowLabelFor("someone/not-in-the-catalog", VIDEO_CATALOG), null);++// No two rows of a group may render identically, or the picker offers the same thing twice.+for (const catalog of [IMAGE_CATALOG, VIDEO_CATALOG]) {+ for (const group of catalog) {+ const seen = new Set<string>();+ for (const artifact of group.artifacts) {+ const row = curatedRowLabelFor(artifact.repoId, catalog);+ assert.ok(row, `${artifact.repoId} is in the catalog it came from`);+ const key = `${row.name} | ${row.tags.join(",")}`;+ assert.equal(seen.has(key), false, `${group.displayName}: two rows both read "${key}"`);+ seen.add(key);+ }+ }+}++// A non-GGUF artifact that states a parameter count must state its size too. The picker's VRAM+// badge falls back to the QLoRA estimator when it cannot size a row, and that formula reads a+// diffusion pipeline as a language model it can quantize: 5B params says 5.9 GB where the Wan 2.2+// TI2V pipeline is 30. The curated size is what keeps that fallback off these rows.+for (const catalog of [IMAGE_CATALOG, VIDEO_CATALOG, AUDIO_CATALOG]) {+ for (const group of catalog) {+ for (const artifact of group.artifacts) {+ if (!artifact.totalParams || artifact.format === "gguf") continue;+ assert.ok(+ artifact.approxSizeGb && artifact.approxSizeGb > 0,+ `${artifact.repoId} declares totalParams but no approxSizeGb`,+ );+ }+ }+}++// ── curatedArtifactFitsDevice ──────────────────────────────────────────────────++const WAN = "Wan-AI/Wan2.2-TI2V-5B-Diffusers"; // 30 GB, no offload tiers+const H3 = "MiniMaxAI/MiniMax-H3"; // 145 GB, tiers at 74/140 and 123/80+const fitsCurated = (id: string, gpuGb: number, systemRamGb: number) =>+ curatedArtifactFitsDevice(id, VIDEO_CATALOG, { gpuGb, systemRamGb });++// The resident 70% rule, on the card alone. RAM is not a discrete GPU's budget: a pipeline with+// no measured tier is placed wholly on the card, so 64 GB of RAM does not rescue a 12 GB one.+assert.equal(fitsCurated(WAN, 48, 0), true);+assert.equal(fitsCurated(WAN, 40, 0), false);+assert.equal(fitsCurated(WAN, 12, 64), false);+// A unified-memory host reports RAM and no GPU, and there the RAM is the card.+assert.equal(fitsCurated(WAN, 0, 64), true);+// Nothing to judge against: no verdict rather than a scary one.+assert.equal(fitsCurated(WAN, 0, 0), undefined);+// Measured offload tiers override the 70% rule, in both directions. 123/80 is the case the+// generic size test gets wrong: 0.7 * (123 + 80) is 142, under 145, yet the tier was measured.+assert.equal(fitsCurated(H3, 74, 140), true);+assert.equal(fitsCurated(H3, 123, 80), true);+assert.equal(fitsCurated(H3, 74, 100), false);+// A GGUF ladder self-fits via pickDefaultQuant, and an unknown id is not ours to judge.+assert.equal(fitsCurated("unsloth/MiniMax-H3-GGUF", 12, 64), undefined);+assert.equal(fitsCurated("someone/not-in-the-catalog", 12, 64), undefined);+// Transcription retries a failed device load on CPU (stt_sidecar.py), so RAM is a real budget for+// an stt row: Whisper Large runs on a card too small to hold it. A tts load rejects CPU offload+// (inference.py raise_if_offloaded), so Orpheus is judged on the card alone.+assert.equal(+ curatedArtifactFitsDevice("unsloth/whisper-large-v3", AUDIO_CATALOG, {+ gpuGb: 4,+ systemRamGb: 32,+ }),+ true,+);+assert.equal(+ curatedArtifactFitsDevice("unsloth/whisper-large-v3", AUDIO_CATALOG, {+ gpuGb: 4,+ systemRamGb: 0,+ }),+ false,+);+// The whole model goes to whichever device takes it, so the budget is the LARGER of the two and+// never their sum: 3 GB of card and 3 GB of RAM hold a 4 GB checkpoint on neither.+assert.equal(+ curatedArtifactFitsDevice("unsloth/whisper-large-v3", AUDIO_CATALOG, {+ gpuGb: 3,+ systemRamGb: 3,+ }),+ false,+);+assert.equal(+ curatedArtifactFitsDevice("unsloth/whisper-large-v3", AUDIO_CATALOG, {+ gpuGb: 0,+ systemRamGb: 8,+ }),+ true,+);+assert.equal(+ curatedArtifactFitsDevice("unsloth/orpheus-3b-0.1-ft", AUDIO_CATALOG, {+ gpuGb: 4,+ systemRamGb: 32,+ }),+ false,+);+// ── classifyGgufFit ────────────────────────────────────────────────────────────const GB = 1024 ** 3;diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.tsindex fca1462b4c2..dc7a94c2f52 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts@@ -83,7 +83,6 @@ const bnb4bit = (...extra,});-const fp8Pipeline = (repoId: string,approxSizeGb: number,@@ -117,6 +116,7 @@ const bf16Single = (repoId: string,filename: string,approxSizeGb: number,+ extra?: Partial<ModelArtifact>,): ModelArtifact => ({repoId,format: "bf16",@@ -125,6 +125,7 @@ const bf16Single = (label: "BF16 (official)",approxSizeGb,keywords: ["bf16", "safetensors", "full precision"],+ ...extra,});// ── curated catalogs ────────────────────────────────────────────────────────────@@ -137,8 +138,8 @@ export const IMAGE_CATALOG: CatalogGroup[] = [description: "Text-to-image",scope: "image",artifacts: [- bf16Pipeline("Tongyi-MAI/Z-Image-Turbo", 30),- bnb4bit("unsloth/Z-Image-Turbo-unsloth-bnb-4bit", 8),+ bf16Pipeline("Tongyi-MAI/Z-Image-Turbo", 30, { totalParams: 6154908736 }),+ bnb4bit("unsloth/Z-Image-Turbo-unsloth-bnb-4bit", 8, { totalParams: 3210823936 }),gguf("unsloth/Z-Image-Turbo-GGUF"),],},@@ -159,12 +160,12 @@ export const IMAGE_CATALOG: CatalogGroup[] = [// repo id finding this group.aliases: ["unsloth/Qwen-Image-2512-FP8"],artifacts: [- bf16Pipeline("Qwen/Qwen-Image-2512", 54),+ bf16Pipeline("Qwen/Qwen-Image-2512", 54, { totalParams: 20430401088 }),// No FP8 row: unsloth/Qwen-Image-2512-FP8 holds torch prequant .pt checkpoints, not a// single-file .safetensors, and fp8 is denied for this family anyway// (_FAMILY_SCHEME_DENY: qwen-image renders every frame black under fp8). The repo's int8// half is reached through the backend prequant path, not from here.- bnb4bit("unsloth/Qwen-Image-2512-unsloth-bnb-4bit", 14),+ bnb4bit("unsloth/Qwen-Image-2512-unsloth-bnb-4bit", 14, { totalParams: 10850871408 }),gguf("unsloth/Qwen-Image-2512-GGUF"),],},@@ -174,7 +175,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [description: "Text-to-image",scope: "image",artifacts: [- bf16Pipeline("Qwen/Qwen-Image", 54),+ bf16Pipeline("Qwen/Qwen-Image", 54, { totalParams: 20430401088 }),gguf("unsloth/Qwen-Image-GGUF"),],},@@ -186,7 +187,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [artifacts: [// Apache-2.0 but still gated on the Hub (gated: "auto", a contact-info form), so an// anonymous download 401s exactly like dev. The licence and the gate are independent.- bf16Pipeline("black-forest-labs/FLUX.1-schnell", 32, { gated: true }),+ bf16Pipeline("black-forest-labs/FLUX.1-schnell", 32, { gated: true, totalParams: 11891178560 }),gguf("unsloth/FLUX.1-schnell-GGUF"),],},@@ -197,7 +198,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [scope: "image",artifacts: [// FLUX.1-dev is gated (license acceptance + token), like FLUX.1-schnell above.- bf16Pipeline("black-forest-labs/FLUX.1-dev", 32, { gated: true }),+ bf16Pipeline("black-forest-labs/FLUX.1-dev", 32, { gated: true, totalParams: 11901408320 }),gguf("unsloth/FLUX.1-dev-GGUF"),],},@@ -208,7 +209,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [description: "Text-to-image",scope: "image",artifacts: [- bf16Pipeline("black-forest-labs/FLUX.1-Krea-dev", 32, { gated: true }),+ bf16Pipeline("black-forest-labs/FLUX.1-Krea-dev", 32, { gated: true, totalParams: 11901408320 }),gguf("QuantStack/FLUX.1-Krea-dev-GGUF"),],},@@ -232,7 +233,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [description: "Image editing",scope: "image",artifacts: [- bf16Pipeline("Qwen/Qwen-Image-Edit-2511", 54),+ bf16Pipeline("Qwen/Qwen-Image-Edit-2511", 54, { totalParams: 20430401088 }),gguf("unsloth/Qwen-Image-Edit-2511-GGUF"),],},@@ -243,7 +244,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [scope: "image",artifacts: [// FLUX.1-Kontext-dev is gated on the Hub (license acceptance + token).- bf16Pipeline("black-forest-labs/FLUX.1-Kontext-dev", 32, { gated: true }),+ bf16Pipeline("black-forest-labs/FLUX.1-Kontext-dev", 32, { gated: true, totalParams: 11901408320 }),gguf("unsloth/FLUX.1-Kontext-dev-GGUF"),],},@@ -254,7 +255,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [scope: "image",// Gated on the Hub, and the group's only artifact, so a bare click has nothing open to fall// through to: the picker must show the gate rather than start a download that 401s.- artifacts: [bf16Pipeline("krea/Krea-2-Turbo", 18, { gated: true })],+ artifacts: [bf16Pipeline("krea/Krea-2-Turbo", 18, { gated: true, totalParams: 12820073036 })],},{// 2.6B DiT + Gemma2-2B encoder, ~11 GB bf16-resident (ships fp32, cast on load). Apache-2.0, ungated. No upstream GGUF quants, so the official pipeline is the only artifact.@@ -262,7 +263,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [displayName: "Lumina Image 2.0",description: "Text-to-image",scope: "image",- artifacts: [bf16Pipeline("Alpha-VLLM/Lumina-Image-2.0", 11)],+ artifacts: [bf16Pipeline("Alpha-VLLM/Lumina-Image-2.0", 11, { totalParams: 2609769152 })],},{// 17B dual-stream 2K-native DiT with a Qwen2.5-VL encoder; the mirror guider components load natively on diffusers 0.39. ~50 GB bf16-resident, so consumer GPUs route to the QuantStack GGUF.@@ -271,7 +272,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [description: "Text-to-image",scope: "image",artifacts: [- bf16Pipeline("hunyuanvideo-community/HunyuanImage-2.1-Diffusers", 50),+ bf16Pipeline("hunyuanvideo-community/HunyuanImage-2.1-Diffusers", 50, { totalParams: 17425795520 }),gguf("QuantStack/HunyuanImage-2.1-GGUF"),],},@@ -283,14 +284,16 @@ export const IMAGE_CATALOG: CatalogGroup[] = [description: "Text-to-image",scope: "image",artifacts: [- bf16Pipeline("HiDream-ai/HiDream-I1-Full", 63),+ bf16Pipeline("HiDream-ai/HiDream-I1-Full", 63, { totalParams: 17105733184 }),bf16Pipeline("HiDream-ai/HiDream-I1-Dev", 63, {label: "BF16 - Dev (distilled)",keywords: ["bf16", "dev", "distilled"],+ totalParams: 17105733184,}),bf16Pipeline("HiDream-ai/HiDream-I1-Fast", 63, {label: "BF16 - Fast (distilled)",keywords: ["bf16", "fast", "distilled"],+ totalParams: 17105733184,}),],},@@ -302,8 +305,8 @@ export const IMAGE_CATALOG: CatalogGroup[] = [scope: "image",artifacts: [// Both Ideogram repos are gated on the Hub, so neither can be auto-routed anonymously.- fp8Pipeline("ideogram-ai/ideogram-4-fp8", 46, { gated: true }),- bnb4bit("ideogram-ai/ideogram-4-nf4-diffusers", 11, { gated: true }),+ fp8Pipeline("ideogram-ai/ideogram-4-fp8", 46, { gated: true, totalParams: 9281557760 }),+ bnb4bit("ideogram-ai/ideogram-4-nf4-diffusers", 11, { gated: true, totalParams: 4785317809 }),],},// SDXL Turbo and Base are different checkpoints with different step/guidance defaults, so two groups.@@ -312,7 +315,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [displayName: "SDXL Turbo",description: "Text-to-image",scope: "image",- artifacts: [bf16Pipeline("stabilityai/sdxl-turbo", 8, { label: "Safetensors" })],+ artifacts: [bf16Pipeline("stabilityai/sdxl-turbo", 8, { label: "Safetensors", totalParams: 2567463684 })],},{canonicalId: "stabilityai/stable-diffusion-xl-base-1.0",@@ -322,6 +325,7 @@ export const IMAGE_CATALOG: CatalogGroup[] = [artifacts: [bf16Pipeline("stabilityai/stable-diffusion-xl-base-1.0", 8, {label: "Safetensors",+ totalParams: 2567463684,}),],},@@ -400,21 +404,21 @@ export const VIDEO_CATALOG: CatalogGroup[] = [description: "Text-to-video with audio",scope: "video",capabilities: { audio: true },- artifacts: [bf16Pipeline("Lightricks/LTX-2", 90)],+ artifacts: [bf16Pipeline("Lightricks/LTX-2", 90, { totalParams: 18876174592 })],},{canonicalId: "Wan-AI/Wan2.2-TI2V-5B",displayName: "Wan 2.2 TI2V 5B",description: "Text-to-video 720p",scope: "video",- artifacts: [bf16Pipeline("Wan-AI/Wan2.2-TI2V-5B-Diffusers", 30)],+ artifacts: [bf16Pipeline("Wan-AI/Wan2.2-TI2V-5B-Diffusers", 30, { totalParams: 4999787712 })],},{canonicalId: "Wan-AI/Wan2.2-T2V-A14B",displayName: "Wan 2.2 T2V A14B (MoE)",description: "Text-to-video, dual-expert",scope: "video",- artifacts: [bf16Pipeline("Wan-AI/Wan2.2-T2V-A14B-Diffusers", 114)],+ artifacts: [bf16Pipeline("Wan-AI/Wan2.2-T2V-A14B-Diffusers", 114, { totalParams: 14288491584 })],},{canonicalId: "hunyuanvideo-community/HunyuanVideo-1.5",@@ -427,10 +431,12 @@ export const VIDEO_CATALOG: CatalogGroup[] = [bf16Pipeline("hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-720p_t2v", 52, {label: "BF16 - 720p",keywords: ["bf16", "720p"],+ totalParams: 8326608160,}),bf16Pipeline("hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_t2v", 40, {label: "BF16 - 480p",keywords: ["bf16", "480p"],+ totalParams: 8326608160,}),],},@@ -700,12 +706,18 @@ export function curatedCapabilitiesFor(repoId: string,catalog: CatalogGroup[],): ModelCapabilities | undefined {- const declared = groupForRepoId(repoId, catalog)?.capabilities;- if (!declared) return undefined;+ const group = groupForRepoId(repoId, catalog);+ if (!group) return undefined;+ const declared = group.capabilities;return {- vision: declared.vision ?? false,- reasoning: declared.reasoning ?? false,- audio: declared.audio ?? false,+ vision: declared?.vision ?? false,+ reasoning: declared?.reasoning ?? false,+ audio: declared?.audio ?? false,+ // From the group's scope rather than a declaration: every catalog entry is a generator of one+ // or the other, and the scope already says which. Beats the name heuristic, which has to guess+ // a family from a repo id.+ imageGen: declared?.imageGen ?? group.scope === "image",+ videoGen: declared?.videoGen ?? group.scope === "video",};}@@ -722,6 +734,48 @@ export function curatedDisplayNameFor(: hit.group.displayName;}+// Artifact labels are written as "FORMAT" or "FORMAT - QUALIFIER": "BF16 (official)", "GGUF",+// "BF16 - 720p", "GGUF - Text and frames". The format head and a resolution qualifier are chips;+// anything else stays in the name, since it is the only thing telling two rows of one group apart.+const LABEL_PART_SEPARATOR = " - ";+const OFFICIAL_SUFFIX_RE = /\s*\(official\)$/i;+const GGUF_SUFFIX_RE = /-gguf$/i;+const RESOLUTION_RE = /^\d{3,4}p$/i;++/**+ * A curated row as name plus chips.+ *+ * The name used to carry the artifact inside brackets ("MiniMax H3 (BF16 (official))"), which+ * pushed the part a user scans for behind the part they do not. Null for ids outside the catalog.+ */+export function curatedRowLabelFor(+ repoId: string,+ catalog: CatalogGroup[],+): { name: string; tags: string[] } | null {+ const hit = artifactForRepoId(repoId, catalog);+ if (!hit) return null;+ // GGUF reads like a text model's row: the repo name already ends in -GGUF, so show the repo+ // name and let it say so. A chip would only repeat the suffix.+ if (hit.artifact.format === "gguf") {+ const leaf = hit.artifact.repoId.split("/").pop() ?? hit.artifact.repoId;+ return { name: GGUF_SUFFIX_RE.test(leaf) ? leaf : `${leaf}-GGUF`, tags: [] };+ }+ // A group with one artifact has nothing to distinguish, so it stays bare, exactly as before.+ if (hit.group.artifacts.length <= 1) return { name: hit.group.displayName, tags: [] };+ const [format, ...rest] = hit.artifact.label.split(LABEL_PART_SEPARATOR);+ const tags = [format.replace(OFFICIAL_SUFFIX_RE, "").trim()].filter(Boolean);+ const kept: string[] = [];+ for (const part of rest) {+ if (RESOLUTION_RE.test(part.trim())) tags.push(part.trim());+ else kept.push(part);+ }+ const name =+ kept.length > 0+ ? `${hit.group.displayName} (${kept.join(LABEL_PART_SEPARATOR)})`+ : hit.group.displayName;+ return { name, tags };+}+/** Back-compat: the flat ModelOption list the ModelSelector `models` prop expects, one option per ARTIFACT. */export function catalogToModelOptions(catalog: CatalogGroup[]): ModelOption[] {const options: ModelOption[] = [];@@ -906,6 +960,43 @@ export function pickDefaultArtifact()[0];}+/**+ * Whether ONE curated artifact loads on this device, by the rule `pickDefaultArtifact` routes+ * with, since a row click loads that exact artifact.+ *+ * System RAM is not part of a discrete-GPU budget: a pipeline goes wholly on the card unless the+ * catalog states a measured offload tier, which is what `offloadFitTiers` is for, or unless the+ * loader falls back to CPU, which only transcription does. A unified-memory host reports RAM and+ * no GPU, and there the RAM is the card.+ *+ * Undefined where nothing can be judged, so the caller shows no verdict rather than a wrong one:+ * an unknown budget, an id the catalog does not carry, a GGUF quant ladder (it self-fits via+ * `pickDefaultQuant`), or an artifact with no stated size.+ */+export function curatedArtifactFitsDevice(+ repoId: string,+ catalog: CatalogGroup[],+ budget: DeviceBudget,+): boolean | undefined {+ const hit = artifactForRepoId(repoId, catalog);+ if (!hit || hit.artifact.format === "gguf") return undefined;+ const { group, artifact } = hit;+ if (budget.gpuGb <= 0 && budget.systemRamGb <= 0) return undefined;+ if (artifact.offloadFitTiers?.length) return fitsArtifactBudget(artifact, budget);+ if (artifact.approxSizeGb === undefined) return undefined;+ // Transcription retries a failed device load on CPU (stt_sidecar.py), so RAM is a real budget+ // there -- but the WHOLE model goes to whichever device it lands on, never split across both,+ // so it is the larger of the two and not their sum. An image, video or TTS load rejects CPU+ // offload, so those get the card alone.+ const deviceGb =+ group.task === "stt"+ ? Math.max(budget.gpuGb, budget.systemRamGb)+ : budget.gpuGb > 0+ ? budget.gpuGb+ : budget.systemRamGb;+ return artifact.approxSizeGb <= deviceGb * 0.7;+}+/** Whether the "fit on device" toggle keeps a group, including measured offload tiers when an artifact provides them. */export function catalogGroupFitsDevice(group: CatalogGroup,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.tsxindex 7a359ef7ed5..e816963ee6f 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@@ -76,8 +76,10 @@ import {DashboardCircleIcon,Download01Icon,Flag01Icon,+ FlimSlateIcon,Folder02Icon,HelpCircleIcon,+ Image03Icon,PinIcon,RemoveCircleIcon,Search01Icon,@@ -91,7 +93,9 @@ import {type KeyboardEvent,type ReactNode,type SetStateAction,+ createContext,useCallback,+ useContext,useEffect,useId,useMemo,@@ -118,14 +122,15 @@ import { FolderBrowser } from "./folder-browser";import {type ModelCapabilities,detectCapabilities,- hasAnyCapability,} from "./model-capabilities";import {AUDIO_CATALOG,type CatalogGroup,+ type DeviceBudget,artifactForRepoId,+ curatedArtifactFitsDevice,curatedCapabilitiesFor,- curatedDisplayNameFor,+ curatedRowLabelFor,curatedSizeBytesFor,curatedTotalParamsFor,groupForRepoId,@@ -449,21 +454,78 @@ function formatBytes(bytes: number): string {// Small icon badges for what a model can do (vision / reasoning / audio).// Vision and reasoning badges were dropped to keep rows uncluttered.-const CAPABILITY_BADGES = [- { key: "audio" as const, icon: AudioWave01Icon, title: "Audio" },+// Most distinguishing first, because only the first MAX_CAPABILITY_BADGES are drawn: what a model+// GENERATES separates it from the whole list, reasoning separates it from very little. Each glyph+// is the one the rest of the app already uses for that thing -- the Images and Video page icons+// from the sidebar nav, the eye the On Device vision badge draws, the composer's thinking bulb.+const CAPABILITY_BADGES: {+ key: keyof ModelCapabilities;+ title: string;+ Glyph: (props: { className: string }) => ReactNode;+}[] = [+ {+ key: "videoGen",+ title: "Generates video",+ Glyph: (props) => (+ <HugeiconsIcon icon={FlimSlateIcon} strokeWidth={1.8} {...props} />+ ),+ },+ {+ key: "imageGen",+ title: "Generates images",+ Glyph: (props) => (+ <HugeiconsIcon icon={Image03Icon} strokeWidth={1.8} {...props} />+ ),+ },+ {+ key: "audio",+ // Direction-neutral, unlike the two above: `audio` covers ASR and audio classification as+ // well as speech synthesis, so a Whisper row would be claiming to generate what it consumes.+ title: "Audio",+ Glyph: (props) => (+ <HugeiconsIcon icon={AudioWave01Icon} strokeWidth={1.8} {...props} />+ ),+ },];+/**+ * Which capability glyphs are worth drawing in the current picker; null draws them all.+ *+ * A media picker has already filtered the list to one kind of model, so its own kind is not+ * information: every row of the Images picker generates images. Audio is the exception on Video,+ * where only some models carry a soundtrack. Context rather than a prop because every row in the+ * tree wants the same answer and it comes from the picker, not the row.+ */+const CapabilityScope = createContext<readonly (keyof ModelCapabilities)[] | null>(+ null,+);++// The row reserves a fixed slot for these (META_COLUMN.badge), so the cap is what keeps every+// column after it lined up.+const MAX_CAPABILITY_BADGES = 3;++/** The glyphs this row actually draws, so the caller can size the slot and skip an empty one. */+function visibleCapabilityBadges(+ caps: ModelCapabilities,+ scope: readonly (keyof ModelCapabilities)[] | null,+) {+ return CAPABILITY_BADGES.filter(+ (b) => caps[b.key] && (scope?.includes(b.key) ?? true),+ ).slice(0, MAX_CAPABILITY_BADGES);+}+function CapabilityIcons({ caps }: { caps: ModelCapabilities }) {+ const scope = useContext(CapabilityScope);return (<>- {CAPABILITY_BADGES.filter((b) => caps[b.key]).map((b) => (+ {visibleCapabilityBadges(caps, scope).map(({ key, title, Glyph }) => (<span- key={b.key}- title={b.title}- aria-label={b.title}+ key={key}+ title={title}+ aria-label={title}className="flex size-[18px] shrink-0 items-center justify-center rounded-md border border-border/60 text-muted-foreground">- <HugeiconsIcon icon={b.icon} className="size-3" strokeWidth={1.8} />+ <Glyph className="size-3" /></span>))}</>@@ -677,11 +739,27 @@ function isRuntimeLoadedModel(// follow the UI font scale, and collapse below the picker's full width.// min-w-min means a width is the column held open, not a clamp: an outsized// badge grows its own slot rather than spilling over the next one.+/** A GPU inventory in the shape the catalog's fit rules take. */+function artifactBudget(gpu: {+ memoryTotalGb: number;+ systemRamAvailableGb: number;+}): DeviceBudget {+ return { gpuGb: gpu.memoryTotalGb, systemRamGb: gpu.systemRamAvailableGb };+}+const META_COLUMN = {// Fits "UD-Q4_K_XL"; a hard cap, so longer quants clip.quant: "min-[560px]:w-[7.2em]",- // One capability / vision / downloaded badge.+ // The badge slot holds capability glyphs (18px), the vision badge (24px) and the Hub lists'+ // "on disk" mark (12px), gap-1 between them. Each width below is the widest set its scope can+ // draw, since anything wider makes min-w-min expand the slot and shift every column after it.+ // Scope draws no glyph: the vision badge alone, or the disk mark alone.badge: "min-w-min min-[560px]:w-[24px]",+ // One glyph plus the disk mark (18 + 4 + 12).+ badgeMid: "min-w-min min-[560px]:w-[34px]",+ // Unscoped chat: a generation glyph and audio, plus whichever of vision (On Device rows) or the+ // disk mark (Hub rows) that list carries -- the two never appear on the same row (18+4+18+4+24).+ badgeWide: "min-w-min min-[560px]:w-[68px]",// The "OOM" pill, wider than bare "TIGHT" (Hub rows).vram: "min-w-min min-[560px]:w-[4em]",// "235B" on device rows; Hub rows report "2779.5B", hence paramWide.@@ -717,6 +795,7 @@ function ModelRow({downloaded,showVision,quantChip,+ tags,alignMeta,showSize,className,@@ -747,6 +826,9 @@ function ModelRow({showVision?: boolean;/** Grey chip beside the name, for rows that load one specific quant. */quantChip?: string | null;+ /** Chips for what used to sit in brackets after the name: the artifact format, and a+ * resolution when one variant differs from another only by it. Same chip as On Device. */+ tags?: string[];/** Column layout (see META_COLUMN): "device" reserves the quant chip,* "hub" the download and VRAM badges those lists carry instead. */alignMeta?: "device" | "hub";@@ -776,7 +858,17 @@ function ModelRow({const paramLabel = parsed.param ?? extractParamLabel(name) ?? null;// Use the passed-in capabilities (tag-aware) or infer from the repo name.const caps = capabilities ?? detectCapabilities({ id: label });- const showCaps = hasAnyCapability(caps);+ const capabilityScope = useContext(CapabilityScope);+ const capabilityBadges = visibleCapabilityBadges(caps, capabilityScope);+ const showCaps = capabilityBadges.length > 0;+ // Reserve only what this picker's scope can draw. The Images and Audio pickers draw no glyph and+ // Video draws one, so holding the chat row's slot open there is dead space on every row.+ const badgeColumn =+ capabilityScope === null || capabilityScope.length > 1+ ? META_COLUMN.badgeWide+ : capabilityScope.length === 1+ ? META_COLUMN.badgeMid+ : META_COLUMN.badge;const aligned = alignMeta !== undefined;// One dot per row. A second format shares the first's colour anyway, so it// rides along in the tooltip instead of pushing the name out of line.@@ -851,6 +943,13 @@ function ModelRow({{quantChip}</span>) : null}+ {tags && tags.length > 0 ? (+ <span className="ml-1.5 flex shrink-0 items-center gap-1 self-center">+ {tags.map((tag) => (+ <QuantChip key={tag} label={tag} />+ ))}+ </span>+ ) : null}</span><spanclassName={cn(@@ -864,7 +963,7 @@ function ModelRow({<spanclassName={cn("flex shrink-0 items-center justify-center gap-1 text-ui-10",- META_COLUMN.badge,+ badgeColumn,)}>{showCaps && <CapabilityIcons caps={caps} />}@@ -1950,7 +2049,13 @@ export const IMAGE_GEN_TASKS = [// Video-generation pipeline tasks: owned by the Video page, never chat-loadable. The backend reports "text-to-video" for video-diffusion GGUFs.// image-to-video is included because HF gives the LTX-2 family that pipeline_tag, so a text-to-video-only filter dropped it out of Video Hub search.-export const VIDEO_GEN_TASKS = ["text-to-video", "image-to-video"] as const;+// image-text-to-video is MiniMax-H3's tag: a frame plus a prompt in, video out. Without it the+// Video picker never finds such a model and chat tries to load it as a language model.+export const VIDEO_GEN_TASKS = [+ "text-to-video",+ "image-to-video",+ "image-text-to-video",+] as const;// Speech pipeline tasks: owned by the Audio page. TTS picks load there rather than into chat; ASR picks map to the dictation sidecar.export const AUDIO_GEN_TASKS = [@@ -2887,10 +2992,34 @@ export function HubModelPicker({const [customSort, setCustomSort] = useState<LocalSortKey>("recent");// Format filter toggle for the Unsloth listing.const [formatFilter, setFormatFilter] = useState<FormatFilter>("all");+ // What this picker's task filter has already established about every row it can show. The Images+ // and Video pages pass their generation tasks; chat passes none and keeps the full set.+ const capabilityScope = useMemo<readonly (keyof ModelCapabilities)[] | null>(() => {+ const tasks: readonly string[] = task+ ? typeof task === "string"+ ? [task]+ : task+ : [];+ if (tasks.length === 0) return null;+ // Video keeps audio: a soundtrack is the one thing that separates two video models here.+ if (VIDEO_GEN_TASKS.some((t) => tasks.includes(t))) return ["audio"];+ if (IMAGE_GEN_TASKS.some((t) => tasks.includes(t))) return [];+ if (AUDIO_GEN_TASKS.some((t) => tasks.includes(t))) return [];+ return null;+ }, [task]);+// MLX and Safetensors repos are one download, so a row can name its size.const hubRowsShowSize =formatFilter === "mlx" || formatFilter === "safetensors";+ // A curated row's name and its chips. Ids outside the catalog have neither, so they show the+ // raw repo id exactly as before.+ const curatedRow = useCallback(+ (id: string) =>+ (catalog && curatedRowLabelFor(id, catalog)) ?? { name: id, tags: [] as string[] },+ [catalog],+ );+// Paint curated rows before any request, so a task-scoped picker whose models// are already in memory does not sit on a spinner for a round trip.const catalogSeedRows = useMemo<HfModelResult[]>(() => {@@ -2920,6 +3049,15 @@ export function HubModelPicker({}));}, [catalog, models, formatFilter, isKnownGgufRepo, task]);+ /** The catalog's own fit verdict for a curated artifact, or undefined where it has none.+ * Every list that judges a row against the device goes through this, so a badge and the+ * filters around it cannot end up telling the user two different things. */+ const catalogFit = useCallback(+ (id: string, budget: DeviceBudget) =>+ catalog ? curatedArtifactFitsDevice(id, catalog, budget) : undefined,+ [catalog],+ );+const isUnslothOwned = useCallback((id: string) => id.toLowerCase().startsWith("unsloth/"),[],@@ -2977,10 +3115,14 @@ export function HubModelPicker({const taskScoped = Boolean(task);const rowGpu = loadScopedGpu(gpu, taskScoped);const rowInferenceGpu = loadScopedGpu(inferenceGpu, taskScoped);+ const pipelineBudget = artifactBudget(rowGpu);const fits = (r: HfModelResult) =>// Downloaded models show regardless of fit.downloadedSet.has(r.id.toLowerCase()) ||- hfModelFitsDevice(r, r.isGguf ? rowInferenceGpu : rowGpu);+ // The catalog's own verdict where it has one, so this list and the OOM badge on its rows+ // cannot disagree: hfModelFitsDevice counts RAM toward a load that never leaves the card.+ (catalogFit(r.id, pipelineBudget) ??+ hfModelFitsDevice(r, r.isGguf ? rowInferenceGpu : rowGpu));const unslothRows = orderRecommendedRows({seeds: catalogSeedRows,results: recommendedSearch.results,@@ -3013,6 +3155,7 @@ export function HubModelPicker({isChatSupported,task,catalog,+ catalogFit,communityRecommendedEnabled,communityBrowse.results,isLoadableCommunityRepo,@@ -3026,6 +3169,27 @@ export function HubModelPicker({string,{ meta: string | null; status: VramFitStatus | null; est: number }>();+ /** Size-based verdict for a row whose real footprint we know, against the budget that row+ * actually loads into. Same split as the list's own fit filter, so the badge and the+ * "Fits on device" gate cannot disagree about one row. */+ const exceedsSize = (+ sizeBytes: number | undefined,+ budget: typeof inferenceGpu,+ ) =>+ (budget.budgetKnown ||+ budget.memoryTotalGb > 0 ||+ budget.systemRamAvailableGb > 0) &&+ sizeBytes != null &&+ !fitsDevice({+ sizeBytes,+ gpuGb: budget.memoryTotalGb,+ systemRamGb: budget.systemRamAvailableGb,+ budgetKnown: budget.budgetKnown,+ });+ // A curated pipeline loads through torch, and a task load puts the whole thing on ONE+ // device, so it is judged there. inferenceGpu is the GGUF backend's inventory, which can+ // be a different install (Vulkan llama.cpp) or the sum of several cards.+ const pipelineBudget = artifactBudget(loadScopedGpu(gpu, Boolean(task)));// Community rows come from their own listing; without them folded in here// they render with no size or VRAM chip.for (const r of [@@ -3063,26 +3227,28 @@ export function HubModelPicker({const sizeBytes =r.estimatedSizeBytes ??(params ? estimateQuantBytes(params) : undefined);- const hasDeviceBudget =- inferenceGpu.budgetKnown ||- inferenceGpu.memoryTotalGb > 0 ||- inferenceGpu.systemRamAvailableGb > 0;- const exceeds =- hasDeviceBudget &&- sizeBytes != null &&- !fitsDevice({- sizeBytes,- gpuGb: inferenceGpu.memoryTotalGb,- systemRamGb: inferenceGpu.systemRamAvailableGb,- budgetKnown: inferenceGpu.budgetKnown,- });map.set(r.id, {meta,- status: exceeds ? "exceeds" : null,+ status: exceedsSize(sizeBytes, inferenceGpu) ? "exceeds" : null,est: sizeBytes ? Math.round(sizeBytes / 1024 ** 3) : 0,});continue;}+ // A curated pipeline is judged by the catalog, which knows its resident size and any+ // measured offload tier. The QLoRA estimator below reads a diffusion pipeline as a+ // language model it can 4-bit quantize: Wan 2.2 TI2V is 30 GB, and 5B params says 5.9.+ const curatedFits = catalogFit(r.id, pipelineBudget);+ if (curatedFits !== undefined) {+ const curatedBytes = catalog+ ? (r.curatedSizeBytes ?? curatedSizeBytesFor(r.id, catalog))+ : undefined;+ map.set(r.id, {+ meta,+ status: curatedFits ? null : "exceeds",+ est: curatedBytes ? Math.round(curatedBytes / 1024 ** 3) : 0,+ });+ continue;+ }const est = r.totalParams? estimateLoadingVram(r.totalParams, "qlora"): 0;@@ -3095,6 +3261,9 @@ export function HubModelPicker({recommendedSearch.results,communityBrowse.results,catalogSeedRows,+ catalog,+ catalogFit,+ task,isKnownGgufRepo,gpu,inferenceGpu,@@ -3186,9 +3355,25 @@ export function HubModelPicker({}if (catalog) {for (const row of catalogSeedRows) {- if (map.has(row.id)) continue;const curated = curatedCapabilitiesFor(row.id, catalog);- if (curated) map.set(row.id, curated);+ if (!curated) continue;+ const detected = map.get(row.id);+ // Merged, not skipped when the listing already answered. A curated entry states what the+ // model does (H3's audio track, which no tag on the repo mentions); the listing only ever+ // adds to that. Taking whichever arrived first dropped the declaration on any row the+ // listing happened to return.+ map.set(+ row.id,+ detected+ ? {+ vision: detected.vision || curated.vision,+ reasoning: detected.reasoning || curated.reasoning,+ audio: detected.audio || curated.audio,+ imageGen: detected.imageGen || curated.imageGen,+ videoGen: detected.videoGen || curated.videoGen,+ }+ : curated,+ );}}return map;@@ -3776,6 +3961,7 @@ export function HubModelPicker({estimatedSizeBytes?: number;curatedSizeBytes?: number;}) =>+ catalogFit(row.id, artifactBudget(loadScopedGpu(gpu, Boolean(task)))) ??searchRowFitsDevice({...row,@@ -3800,6 +3986,7 @@ export function HubModelPicker({),[catalog,+ catalogFit,gpu,inferenceGpu,isKnownGgufRepo,@@ -4131,10 +4318,27 @@ export function HubModelPicker({string,{ est: number; status: VramFitStatus | null; detail: string | null }>();+ const pipelineBudget = artifactBudget(loadScopedGpu(gpu, Boolean(task)));for (const id of filteredRecommendedIds) {// GGUF fit is size-based and badged elsewhere; skip the qlora estimate.if (isKnownGgufRepo(id)) continue;const totalParams = recommendedParamCountById.get(id) ?? paramsFromId(id);+ // Same verdict the unfiltered list gives this row: searching for a model must not change+ // what it says about the device. paramsFromId reads "5B" out of the Wan id on its own, so+ // the estimator answers here even where the catalog is the only real source of a size.+ const curatedFits = catalogFit(id, pipelineBudget);+ if (catalog && curatedFits !== undefined) {+ const curatedBytes = curatedSizeBytesFor(id, catalog);+ // The catalog is the only source of a count for a curated repo the listing never+ // returns and whose id spells no "<n>B", so the chip must fall back to it here too.+ const params = totalParams ?? curatedTotalParamsFor(id, catalog);+ map.set(id, {+ est: curatedBytes ? Math.round(curatedBytes / 1024 ** 3) : 0,+ status: curatedFits ? null : "exceeds",+ detail: params ? formatCompact(params) : null,+ });+ continue;+ }if (totalParams) {const est = estimateLoadingVram(totalParams, "qlora");const status = gpu.available@@ -4145,7 +4349,15 @@ export function HubModelPicker({}}return map;- }, [filteredRecommendedIds, recommendedParamCountById, isKnownGgufRepo, gpu]);+ }, [+ filteredRecommendedIds,+ recommendedParamCountById,+ isKnownGgufRepo,+ catalog,+ catalogFit,+ task,+ gpu,+ ]);const searchHasMore =hasMore || (communityDiscoveryEnabled && communityQuerySearch.hasMore);@@ -4865,7 +5077,7 @@ export function HubModelPicker({};return (- <>+ <CapabilityScope.Provider value={capabilityScope}><div className="relative space-y-2">{/* A small right inset shortens the search bar so Search Hub lands on thelast dropdown's right edge (none on the wider Connected box). */}@@ -5877,9 +6089,8 @@ export function HubModelPicker({return (<div key={id}><ModelRow- label={- (catalog && curatedDisplayNameFor(id, catalog)) || id- }+ label={curatedRow(id).name}+ tags={curatedRow(id).tags}hubUrl={hubRepoUrl(id)}alignMeta="hub"showSize={hubRowsShowSize}@@ -5985,9 +6196,8 @@ export function HubModelPicker({return (<div key={id}><ModelRow- label={- (catalog && curatedDisplayNameFor(id, catalog)) || id- }+ label={curatedRow(id).name}+ tags={curatedRow(id).tags}hubUrl={hubRepoUrl(id)}alignMeta="hub"showSize={hubRowsShowSize}@@ -6101,9 +6311,8 @@ export function HubModelPicker({return (<div key={id}><ModelRow- label={- (catalog && curatedDisplayNameFor(id, catalog)) || id- }+ label={curatedRow(id).name}+ tags={curatedRow(id).tags}hubUrl={hubRepoUrl(id)}alignMeta="hub"showSize={hubRowsShowSize}@@ -6227,7 +6436,7 @@ export function HubModelPicker({onKeepTransport={resumeUpdateConflict}onSwitchTransport={restartUpdateConflict}/>- </>+ </CapabilityScope.Provider>);}diff --git a/studio/frontend/src/features/native-intents/api.ts b/studio/frontend/src/features/native-intents/api.tsindex 3a95744e12c..94982e86c41 100644--- a/studio/frontend/src/features/native-intents/api.ts+++ b/studio/frontend/src/features/native-intents/api.ts@@ -40,11 +40,6 @@ export async function drainNativeIntents(): Promise<NativeIntent[]> {return invokeNative<NativeIntent[]>("drain_native_intents");}-export async function pickNativeModel(): Promise<NativeIntent | null> {- if (!isTauri) return null;- return invokeNative<NativeIntent | null>("pick_native_model");-}-export async function pickHuggingFaceCacheDir(): Promise<string | null> {if (!isTauri) return null;return invokeNative<string | null>("pick_hugging_face_cache_dir");diff --git a/studio/frontend/src/features/native-intents/index.ts b/studio/frontend/src/features/native-intents/index.tsindex 2261cd3747d..9695a3be880 100644--- a/studio/frontend/src/features/native-intents/index.ts+++ b/studio/frontend/src/features/native-intents/index.ts@@ -21,7 +21,6 @@ export {} from "./attachment-target";export { useNativeIntentStore } from "./store";export type { NativeIntent } from "./types";-export { useChooseNativeModel } from "./use-native-dialogs";export { useNativeModelDrop } from "./use-native-drop";export type { NativeModelDropState } from "./use-native-drop";export { useNativePathLeasesSupported } from "./use-native-readiness";diff --git a/studio/frontend/src/features/native-intents/use-native-dialogs.ts b/studio/frontend/src/features/native-intents/use-native-dialogs.tsdeleted file mode 100644index 7f242eadf72..00000000000--- a/studio/frontend/src/features/native-intents/use-native-dialogs.ts+++ /dev/null@@ -1,68 +0,0 @@-import { useCallback, useRef } from "react";-import { toast } from "@/lib/toast";-import { pickNativeModel } from "./api";-import { useNativeIntentStore } from "./store";-import type { NativeIntent } from "./types";--interface ChooseNativeModelOptions {- shouldAutoLoad?: (intent: NativeIntent) => boolean;- onAutoLoad?: (intent: NativeIntent) => Promise<void> | void;-}--function isGgufModelIntent(intent: NativeIntent): boolean {- const label = intent.path.displayLabel || intent.displayLabel;- return (- intent.kind === "model" &&- intent.path.kind === "model" &&- label.toLowerCase().endsWith(".gguf") &&- intent.path.allowedOperations.includes("validate-model") &&- intent.path.allowedOperations.includes("load-model")- );-}--export function useChooseNativeModel(options: ChooseNativeModelOptions = {}) {- const addIntent = useNativeIntentStore((state) => state.addIntent);- const pickingRef = useRef(false);- const onAutoLoad = options.onAutoLoad;- const shouldAutoLoad = options.shouldAutoLoad;-- return useCallback(async () => {- if (pickingRef.current) return;- pickingRef.current = true;- try {- let intent: NativeIntent | null = null;- try {- intent = await pickNativeModel();- } catch (error) {- toast.error("Could not choose local model", {- description: error instanceof Error ? error.message : String(error),- });- return;- }-- if (!intent) return;-- let runAutoLoad = false;- try {- runAutoLoad =- Boolean(onAutoLoad) &&- isGgufModelIntent(intent) &&- shouldAutoLoad?.(intent) === true;- } catch {- runAutoLoad = false;- }- if (!runAutoLoad) {- addIntent(intent);- return;- }-- try {- await onAutoLoad?.(intent);- } catch {- addIntent(intent);- }- } finally {- pickingRef.current = false;- }- }, [addIntent, onAutoLoad, shouldAutoLoad]);-}diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 9a4908c74e3..e62784fcabe 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -17,7 +17,6 @@ export const ar = {searchAriaLabel: "البحث في {noun}",modelSourceAriaLabel: "مصدر النموذج",hubSectionAriaLabel: "قسم Hub",- pickModelFile: "اختيار ملف نموذج من القرص",modelDropped: "لم يعد متاحًا",modelDroppedByProvider: "{provider} · لم يعد متاحًا",modelDisabled: "غير مُفعَّل",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex b6af971ce83..676b7b6d087 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -17,7 +17,6 @@ export const de = {searchAriaLabel: "Suche: {noun}",modelSourceAriaLabel: "Modellquelle",hubSectionAriaLabel: "Hub-Bereich",- pickModelFile: "Modelldatei vom Datenträger auswählen",modelDropped: "Nicht mehr angeboten",modelDroppedByProvider: "{provider} · nicht mehr angeboten",modelDisabled: "Nicht aktiviert",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 10efc2d4aa8..e40ccdd5a3d 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -13,7 +13,6 @@ export const en = {searchAriaLabel: "Search {noun}",modelSourceAriaLabel: "Model source",hubSectionAriaLabel: "Hub section",- pickModelFile: "Pick a model file from disk",modelDropped: "No longer offered",modelDroppedByProvider: "{provider} · no longer offered",modelDisabled: "Not enabled",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex dbeeb689c02..d5464a718da 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -17,7 +17,6 @@ export const es = {searchAriaLabel: "Buscar {noun}",modelSourceAriaLabel: "Origen del modelo",hubSectionAriaLabel: "Sección del Hub",- pickModelFile: "Elegir un archivo de modelo del disco",modelDropped: "Ya no se ofrece",modelDroppedByProvider: "{provider} · ya no se ofrece",modelDisabled: "No activado",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 90a421fe873..9628b47979b 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -17,7 +17,6 @@ export const fr = {searchAriaLabel: "Rechercher des {noun}",modelSourceAriaLabel: "Source du modèle",hubSectionAriaLabel: "Section du Hub",- pickModelFile: "Choisir un fichier de modèle sur le disque",modelDropped: "N'est plus proposé",modelDroppedByProvider: "{provider} · n'est plus proposé",modelDisabled: "Non activé",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 6fd1905b36a..d4dce2e825c 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -17,7 +17,6 @@ export const hi = {searchAriaLabel: "{noun} खोजें",modelSourceAriaLabel: "मॉडल स्रोत",hubSectionAriaLabel: "Hub सेक्शन",- pickModelFile: "डिस्क से मॉडल फ़ाइल चुनें",modelDropped: "अब उपलब्ध नहीं",modelDroppedByProvider: "{provider} · अब उपलब्ध नहीं",modelDisabled: "सक्षम नहीं",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex 8e6508fa0e8..caca3916ee5 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -1240,7 +1240,6 @@ export const it = {searchAriaLabel: "Cerca {noun}",modelSourceAriaLabel: "Origine del modello",hubSectionAriaLabel: "Sezione Hub",- pickModelFile: "Scegli un file del modello dal disco",modelDropped: "Non più offerto",modelDroppedByProvider: "{provider} · non più offerto",modelDisabled: "Non attivato",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex dc3fcebf896..a64d058236c 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -18,7 +18,6 @@ export const ja = {searchAriaLabel: "{noun}を検索",modelSourceAriaLabel: "モデルのソース",hubSectionAriaLabel: "Hub セクション",- pickModelFile: "ディスクからモデルファイルを選択",modelDropped: "提供終了",modelDroppedByProvider: "{provider} · 提供終了",modelDisabled: "無効",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex 2f123b6c842..f3574a476f1 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -16,7 +16,6 @@ export const ko = {searchAriaLabel: "{noun} 검색",modelSourceAriaLabel: "모델 소스",hubSectionAriaLabel: "Hub 섹션",- pickModelFile: "디스크에서 모델 파일 선택",modelDropped: "더 이상 제공되지 않음",modelDroppedByProvider: "{provider} · 더 이상 제공되지 않음",modelDisabled: "사용 안 함",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex af7befbcd73..8d50a5888f9 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -17,7 +17,6 @@ export const ptBR = {searchAriaLabel: "Buscar {noun}",modelSourceAriaLabel: "Origem do modelo",hubSectionAriaLabel: "Seção do Hub",- pickModelFile: "Escolher um arquivo de modelo no disco",modelDropped: "Não é mais oferecido",modelDroppedByProvider: "{provider} · não é mais oferecido",modelDisabled: "Não ativado",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 4693486c328..22299fb8bd4 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -17,7 +17,6 @@ export const ru = {searchAriaLabel: "Поиск: {noun}",modelSourceAriaLabel: "Источник модели",hubSectionAriaLabel: "Раздел Hub",- pickModelFile: "Выбрать файл модели на диске",modelDropped: "Больше не предлагается",modelDroppedByProvider: "{provider} · больше не предлагается",modelDisabled: "Не включена",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 8e2c3ec0e56..0914b559bf4 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -16,7 +16,6 @@ export const zhCN = {searchAriaLabel: "搜索{noun}",modelSourceAriaLabel: "模型来源",hubSectionAriaLabel: "Hub 分区",- pickModelFile: "从磁盘选择模型文件",modelDropped: "已不再提供",modelDroppedByProvider: "{provider} · 已不再提供",modelDisabled: "未启用",diff --git a/studio/frontend/tests/recommended-curated-row-metadata.test.ts b/studio/frontend/tests/recommended-curated-row-metadata.test.tsindex fb018d7f8bd..e11a3c9ddb4 100644--- a/studio/frontend/tests/recommended-curated-row-metadata.test.ts+++ b/studio/frontend/tests/recommended-curated-row-metadata.test.ts@@ -16,6 +16,7 @@ import ts from "typescript";import { detectCapabilities } from "../src/features/model-picker/components/model-selector/model-capabilities.ts";import {+ IMAGE_CATALOG,VIDEO_CATALOG,curatedCapabilitiesFor,curatedTotalParamsFor,@@ -91,11 +92,33 @@ test("a curated audio family reports audio the repo name never mentions", () =>assert.equal(curatedCapabilitiesFor(LTX_GGUF, VIDEO_CATALOG)?.audio, true);});-test("curated capabilities claim nothing they were not given", () => {+test("curated capabilities claim nothing they were not given, beyond the scope", () => {const caps = curatedCapabilitiesFor(H3_GGUF, VIDEO_CATALOG);- assert.deepEqual(caps, { vision: false, reasoning: false, audio: true });- // A group that declares none returns undefined, so the row falls back to name detection.- assert.equal(curatedCapabilitiesFor(WAN_BF16, VIDEO_CATALOG), undefined);+ // vision and reasoning stay false: nothing declared them, and nothing may infer them.+ assert.deepEqual(caps, {+ vision: false,+ reasoning: false,+ audio: true,+ imageGen: false,+ // Not a declaration but not a guess either: the group sits in the video catalog.+ videoGen: true,+ });+ // A group declaring no capabilities still answers, because its scope alone says what it makes.+ // Undefined is reserved for an id the catalog does not know.+ assert.deepEqual(curatedCapabilitiesFor(WAN_BF16, VIDEO_CATALOG), {+ vision: false,+ reasoning: false,+ audio: false,+ imageGen: false,+ videoGen: true,+ });+ assert.equal(curatedCapabilitiesFor("someone/not-curated", VIDEO_CATALOG), undefined);+});++test("an image group reports image generation, not video", () => {+ const caps = curatedCapabilitiesFor("Qwen/Qwen-Image-2512", IMAGE_CATALOG);+ assert.equal(caps?.imageGen, true);+ assert.equal(caps?.videoGen, false);});test("every video group whose description says audio declares the capability", () => {@@ -194,6 +217,102 @@ test("row meta falls back to the curated seeds", () => {assert.match(text, /if\s*\(map\.has\(r\.id\)\)\s*continue;/);});+test("a family name is not read out of a longer word", () => {+ // The fallbacks match model FAMILIES, and a stem runs into its own version digits, so what+ // must not follow is more word. Every one of these is a real repo naming shape.+ for (const id of [+ "org/fluxion-7b",+ "org/pixartful-7b",+ "org/ltxtra-2b",+ "org/mochimo-7b",+ "nunchaku/SVDQuant-int4",+ ]) {+ const caps = detectCapabilities({ id });+ assert.equal(caps.imageGen, false, `${id} read as an image generator`);+ assert.equal(caps.videoGen, false, `${id} read as a video generator`);+ }+ // ...while the versions themselves still resolve, including the family whose name ends in a+ // letter of its own.+ assert.equal(detectCapabilities({ id: "org/flux1-dev-fp8" }).imageGen, true);+ assert.equal(detectCapabilities({ id: "stabilityai/sd3.5-large" }).imageGen, true);+ assert.equal(detectCapabilities({ id: "THUDM/CogVideoX-5b" }).videoGen, true);+ assert.equal(detectCapabilities({ id: "stabilityai/svd-xt" }).videoGen, true);+});++test("every pipeline tag the Video picker lists reads as video generation", () => {+ // Same contract as the Images one below, and the reason image-text-to-video had to reach+ // VIDEO_GEN_TASKS: a row the glyph calls video must route to the Video page, not to a chat load.+ const tags = declarationText("VIDEO_GEN_TASKS").match(/"([^"]+)"/g) ?? [];+ assert.ok(tags.length > 0, "no tags parsed out of VIDEO_GEN_TASKS");+ for (const quoted of tags) {+ const tag = quoted.slice(1, -1);+ assert.equal(+ detectCapabilities({ id: "someone/unfamiliar-name", pipelineTag: tag }).videoGen,+ true,+ `${tag} is listed by the Video picker but does not read as video generation`,+ );+ }+});++test("every pipeline tag the Images picker lists reads as image generation", () => {+ // A row the picker lists has to draw the glyph whatever its repo is called, so the tags+ // detectCapabilities knows cannot be a subset of the ones the picker filters on.+ const tags = declarationText("IMAGE_GEN_TASKS").match(/"([^"]+)"/g) ?? [];+ assert.ok(tags.length > 0, "no tags parsed out of IMAGE_GEN_TASKS");+ for (const quoted of tags) {+ const tag = quoted.slice(1, -1);+ assert.equal(+ detectCapabilities({ id: "someone/unfamiliar-name", pipelineTag: tag }).imageGen,+ true,+ `${tag} is listed by the Images picker but does not read as image generation`,+ );+ }+});++// Both lists that badge a Recommended row: the unfiltered one and the searched one. A model+// must not change what it says about the device just because it was searched for.+for (const declaration of ["recommendedMeta", "recommendedVramMap"]) {+ test(`${declaration} asks the catalog about a curated pipeline`, () => {+ const text = declarationText(declaration);+ // The catalog knows the resident size and any measured offload tier. estimateLoadingVram+ // assumes a language model it can 4-bit quantize, and reads the 30 GB Wan 2.2 TI2V+ // pipeline as 5.9 GB, so it must not be what answers for these rows.+ const curatedAt = text.indexOf("catalogFit(");+ const estimatorAt = text.indexOf("estimateLoadingVram");+ assert.ok(curatedAt >= 0, `${declaration} ignores the curated fit`);+ assert.ok(estimatorAt >= 0, `${declaration} no longer estimates VRAM at all`);+ assert.ok(curatedAt < estimatorAt, "the QLoRA estimator runs first");+ // A task load puts the whole pipeline on one device, and torch is not the GGUF backend's+ // inventory, so the budget is the load-scoped one the list's own fit filter uses.+ assert.match(text, /artifactBudget\(loadScopedGpu\(gpu, Boolean\(task\)\)\)/);+ });+}++test("every list that judges a row against the device asks the same helper", () => {+ // One verdict, four readers: the unfiltered Recommended list, its device filter, the two+ // search lists, and the badge. Splitting them is how a row ends up kept by a filter that+ // calls it a fit and painted with the OOM badge at the same time.+ assert.match(+ declarationText("catalogFit"),+ /curatedArtifactFitsDevice\(id, catalog, budget\)/,+ );+ for (const declaration of ["recommendedRows", "searchRowFits"]) {+ assert.match(+ declarationText(declaration),+ /catalogFit\(/,+ `${declaration} judges rows without the catalog's verdict`,+ );+ }+});++test("GGUF rows keep the inference backend's budget", () => {+ // They load through llama.cpp, so its inventory is the right one for them.+ assert.match(+ declarationText("recommendedMeta"),+ /exceedsSize\(sizeBytes, inferenceGpu\)/,+ );+});+test("capabilities fall back to the curated catalog", () => {assert.match(declarationText("capsById"),