Skip to content

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.

Studio: put downloaded GGUFs under the right On Device filter (#15571)

Nilay3ffcd2490fad
diff --git a/studio/frontend/src/features/hub/lib/model-type-filter.ts b/studio/frontend/src/features/hub/lib/model-type-filter.ts
index 06d6f70977c..f6dab7cfbb1 100644
--- a/studio/frontend/src/features/hub/lib/model-type-filter.ts
+++ b/studio/frontend/src/features/hub/lib/model-type-filter.ts
@@ -11,6 +11,7 @@ import type {
import {
type HubCapabilityFilter,
detectCapabilities,
+ isVideoFamilyName,
} from "./model-capabilities";
import { matchesHubCapability } from "./view-models";
@@ -33,11 +34,22 @@ export function matchesInventoryCapabilities(
return true;
}
const tags = row.tags ?? undefined;
- const pipelineTag = row.pipelineTag ?? undefined;
const id = rowName(row);
+ // A diffusion GGUF this host cannot build still makes images or video.
+ const task =
+ row.task === "image-diffusion-unsupported"
+ ? isVideoFamilyName(id)
+ ? "text-to-video"
+ : "text-to-image"
+ : row.task;
+ const pipelineTag = row.pipelineTag ?? task ?? undefined;
const view = {
capabilities: detectCapabilities(tags, pipelineTag, id),
result: { tags, pipelineTag, id },
};
- return picks.some((key) => matchesHubCapability(view, key));
+ return picks.some(
+ (key) =>
+ !(key === "text" && row.capabilities.supportsVision) &&
+ matchesHubCapability(view, key),
+ );
}
diff --git a/studio/frontend/tests/hub-on-device-filters.test.ts b/studio/frontend/tests/hub-on-device-filters.test.ts
index fe22061aa7c..88b0dec21a6 100644
--- a/studio/frontend/tests/hub-on-device-filters.test.ts
+++ b/studio/frontend/tests/hub-on-device-filters.test.ts
@@ -50,6 +50,34 @@ test("a row's own vision flag counts as Vision", () => {
assert.equal(matchesInventoryCapabilities(row, ["vision"]), true);
});
+test("downloaded GGUFs are grouped by the task the backend classified", async () => {
+ const { buildCachedInventoryRow } = await import(
+ "../src/features/hub/inventory/view-models.ts"
+ );
+ const gguf = (repo_id: string, task: string, supports_vision = false) =>
+ buildCachedInventoryRow(
+ { repo_id, size_bytes: 1, task, model_format: "gguf", capabilities: { supports_vision } },
+ "gguf",
+ );
+ const image = gguf("unsloth/Z-Image-Turbo-GGUF", "text-to-image");
+ const speech = gguf("unsloth/orpheus-3b-0.1-ft-GGUF", "text-to-speech");
+ const vision = gguf("unsloth/gemma-3-4b-it-GGUF", "text-generation", true);
+ const text = gguf("unsloth/Qwen3-8B-GGUF", "text-generation");
+ const unbuildable = gguf("unsloth/Z-Image-Turbo-GGUF", "image-diffusion-unsupported");
+ const unbuildableVideo = gguf("unsloth/Wan2.2-T2V-A14B-GGUF", "image-diffusion-unsupported");
+ assert.equal(matchesInventoryCapabilities(image, ["image-gen"]), true);
+ assert.equal(matchesInventoryCapabilities(image, ["text"]), false);
+ assert.equal(matchesInventoryCapabilities(speech, ["audio"]), true);
+ assert.equal(matchesInventoryCapabilities(speech, ["text"]), false);
+ assert.equal(matchesInventoryCapabilities(vision, ["vision"]), true);
+ assert.equal(matchesInventoryCapabilities(vision, ["text"]), false);
+ assert.equal(matchesInventoryCapabilities(text, ["text"]), true);
+ assert.equal(matchesInventoryCapabilities(unbuildable, ["text"]), false);
+ assert.equal(matchesInventoryCapabilities(unbuildable, ["image-gen"]), true);
+ assert.equal(matchesInventoryCapabilities(unbuildableVideo, ["video-gen"]), true);
+ assert.equal(matchesInventoryCapabilities(unbuildableVideo, ["image-gen"]), false);
+});
+
test("Model folders and Free up space are icon buttons with labels", () => {
const toolbar = readSrc("features/hub/catalog/models-toolbar.tsx");
for (const label of ["Model folders", "Free up space"]) {