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: add Search Hub to the Images, Video and Audio model pickers (#11756)

Michael Han4f3b10480458
diff --git a/studio/frontend/src/app/routes/hub.tsx b/studio/frontend/src/app/routes/hub.tsx
index 8a84d84ced4..469816aed49 100644
--- a/studio/frontend/src/app/routes/hub.tsx
+++ b/studio/frontend/src/app/routes/hub.tsx
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+import type { CapabilityKey } from "@/features/hub";
import { createRoute, lazyRouteComponent } from "@tanstack/react-router";
import { requireAuth } from "../auth-guards";
import { Route as rootRoute } from "./__root";
@@ -10,6 +11,15 @@ const ModelsPage = lazyRouteComponent(
"ModelsPage",
);
+// Discover capability filters a link can preselect.
+const HUB_CAPABILITIES: readonly CapabilityKey[] = [
+ "reasoning",
+ "vision",
+ "audio",
+ "embedding",
+ "diffusion",
+];
+
export interface ModelsSearch {
tab?: "discover" | "downloaded";
model?: string;
@@ -18,6 +28,7 @@ export interface ModelsSearch {
intent?: number;
section?: "trending" | "latest" | "finetune";
kind?: "models" | "datasets";
+ capability?: CapabilityKey;
}
export const Route = createRoute({
@@ -55,6 +66,10 @@ export const Route = createRoute({
if (kind === "models" || kind === "datasets") {
next.kind = kind;
}
+ const capability = search.capability;
+ if (HUB_CAPABILITIES.includes(capability as CapabilityKey)) {
+ next.capability = capability as CapabilityKey;
+ }
return next;
},
});
diff --git a/studio/frontend/src/features/audio/audio-page.tsx b/studio/frontend/src/features/audio/audio-page.tsx
index 986cf6c76ad..59ab7a131f3 100644
--- a/studio/frontend/src/features/audio/audio-page.tsx
+++ b/studio/frontend/src/features/audio/audio-page.tsx
@@ -2603,6 +2603,7 @@ export function AudioPage({
// TTS/ASR come from the checkpoint's own tokenizer, not a curated recipe, so any publisher's
// audio repo loads here.
communityModelPolicy="search-only"
+ hubCapability="audio"
placeholder="Select audio model"
open={active && selectorOpen}
onOpenChange={(o) => setSelectorOpen(active && o)}
diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsx
index 2f50182c119..83c951bbbda 100644
--- a/studio/frontend/src/features/hub/hub-page.tsx
+++ b/studio/frontend/src/features/hub/hub-page.tsx
@@ -745,6 +745,33 @@ export function ModelsPage() {
});
}, [navigate, setModelsTab]);
+ // A capability link opens the sorted Discover list with that filter on (the feed ignores it).
+ // The param is consumed so later filter changes stick and a repeat link re-applies.
+ const urlCapability = hubSearch.capability ?? null;
+ useEffect(() => {
+ if (!urlCapability) return;
+ setResourceType("models");
+ setQuery("");
+ setDiscoverFormat("all");
+ setCapabilityFilter(urlCapability);
+ setSortBrowseActive(true);
+ // The media pages run curated Unsloth uploads, so start there.
+ setOwnerScope("unsloth");
+ void navigate({
+ to: "/hub",
+ // Discover models, whatever tab or kind the link carried.
+ search: (prev) => ({
+ ...prev,
+ tab: "discover",
+ kind: undefined,
+ capability: undefined,
+ section: undefined,
+ model: undefined,
+ }),
+ replace: true,
+ });
+ }, [urlCapability, navigate, setOwnerScope]);
+
const handleSortChange = useCallback(
(next: HfSortKey) => {
setSortBy(next);
diff --git a/studio/frontend/src/features/hub/index.ts b/studio/frontend/src/features/hub/index.ts
index 2222214e447..b9991f96d1d 100644
--- a/studio/frontend/src/features/hub/index.ts
+++ b/studio/frontend/src/features/hub/index.ts
@@ -25,6 +25,7 @@ export {
useHubModelSearch,
} from "./hooks/use-hub-model-search";
export { useHubInfiniteScroll } from "./hooks/use-hub-infinite-scroll";
+export type { CapabilityKey } from "./lib/model-capabilities";
export { useLatestRef } from "./hooks/use-latest-ref";
export { useOnlineStatus } from "./hooks/use-online-status";
export {
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index 00052c80db6..a514061d3d4 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -4234,6 +4234,7 @@ export function ImagesPage({
triggerLabelClassName="text-ui-14 @[68rem]:text-ui-16"
task={IMAGE_GEN_TASKS}
catalog={IMAGE_CATALOG}
+ hubCapability="diffusion"
placeholder="Select image model"
open={active && selectorOpen}
onOpenChange={(o) => setSelectorOpen(active && o)}
diff --git a/studio/frontend/src/features/model-picker/components/model-selector.tsx b/studio/frontend/src/features/model-picker/components/model-selector.tsx
index 561b169afc1..0a9b228819d 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector.tsx
@@ -11,6 +11,7 @@ import {
import { TooltipProvider } from "@/components/ui/tooltip";
import { ApiProviderLogo } from "@/features/chat/api-provider-logo";
+import type { CapabilityKey } from "@/features/hub";
import type { HfTaskFilter } from "@/features/hub/hooks/use-hub-model-search";
// eslint-disable-next-line no-restricted-imports -- The settings barrel imports this feature back.
import { useSettingsDialogStore } from "@/features/settings/stores/settings-dialog-store";
@@ -133,6 +134,8 @@ interface ModelSelectorProps {
/** Also list community (non-unsloth) models for `task`. Opt-in: only pages whose runtime loads
* arbitrary publishers. */
communityModelPolicy?: CommunityModelPolicy;
+ /** Hub filter the Search Hub button opens with. Also shows Search Hub on curated task pickers. */
+ hubCapability?: CapabilityKey;
/** Trigger text when nothing is loaded. Defaults to "Select model"; task pages name what they
* pick so it reads as separate from the chat model. */
placeholder?: string;
@@ -686,6 +689,7 @@ export function ModelSelector({
task,
catalog,
communityModelPolicy = "none",
+ hubCapability,
placeholder,
loaded,
}: ModelSelectorProps) {
@@ -814,7 +818,10 @@ export function ModelSelector({
function handleBrowseHub() {
setOpen(false);
- void navigate({ to: "/hub", search: { tab: "discover" } });
+ void navigate({
+ to: "/hub",
+ search: { tab: "discover", capability: hubCapability },
+ });
}
// A Connected group's gear. What is configurable about a remote model lives on its connection,
@@ -858,10 +865,11 @@ export function ModelSelector({
resolveDownloadFootprint={resolveDownloadFootprint}
onEject={onEject ? handleEject : undefined}
onFoldersChange={onFoldersChange}
- // 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.
+ // Curated task pickers show it only with a Hub filter; community-enabled ones always do.
onBrowseHub={
- task && communityModelPolicy === "none" ? undefined : handleBrowseHub
+ task && communityModelPolicy === "none" && !hubCapability
+ ? undefined
+ : handleBrowseHub
}
onConfigureConnection={handleConfigureConnection}
onModelsChange={onModelsChange}
diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsx
index 32323307497..82ff041efe6 100644
--- a/studio/frontend/src/features/video/video-page.tsx
+++ b/studio/frontend/src/features/video/video-page.tsx
@@ -3504,6 +3504,7 @@ function VideoGenerator({
className="!h-[calc(34px*var(--ui-space-scale,1))]"
task={VIDEO_GEN_TASKS}
catalog={VIDEO_CATALOG}
+ hubCapability="diffusion"
placeholder="Select video model"
open={active && selectorOpen}
onOpenChange={(o) => setSelectorOpen(active && o)}