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
Unsloth Studio: list Cosmos3-Nano in the Video picker and route it from the Hub (#16743)
Leo Borcherding8059310241b0
diff --git a/studio/frontend/src/features/hub/lib/unsloth-support.ts b/studio/frontend/src/features/hub/lib/unsloth-support.tsindex 03673358c7d..7966164ff8c 100644--- a/studio/frontend/src/features/hub/lib/unsloth-support.ts+++ b/studio/frontend/src/features/hub/lib/unsloth-support.ts@@ -153,8 +153,8 @@ const VIDEO_PAGE_TASKS: ReadonlySet<string> = new Set(["image-text-to-video",]);-// Video page repos whose Hub card names no pipeline task. Not Cosmos3-Nano: its guardrail package is not installed.-const VIDEO_PAGE_REPOS: ReadonlySet<string> = new Set(["nvidia/cosmos3-edge"]);+// Video page repos whose Hub card names no pipeline task.+const VIDEO_PAGE_REPOS: ReadonlySet<string> = new Set(["nvidia/cosmos3-nano", "nvidia/cosmos3-edge"]);/** Which Unsloth page runs this pipeline task, if any. */export function studioPageForTask(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 2686a865a92..3453aed255b 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@@ -340,7 +340,7 @@ for (const id of []) {assert.ok(videoOptionIds.has(id), `video option missing: ${id}`);}-for (const id of ["nvidia/Cosmos3-Edge"]) {+for (const id of ["nvidia/Cosmos3-Nano", "nvidia/Cosmos3-Edge"]) {const group = groupForRepoId(id, VIDEO_CATALOG);assert.ok(group, id);assert.equal(groupForRepoId(id.toLowerCase(), VIDEO_CATALOG), group, id);@@ -348,7 +348,6 @@ for (const id of ["nvidia/Cosmos3-Edge"]) {assert.ok(videoOptionIds.has(id), `video option missing: ${id}`);}for (const id of [- "nvidia/Cosmos3-Nano","nvidia/Cosmos3-Nano-Reasoner","nvidia/Cosmos3-Edge-Reasoner","nvidia/Cosmos3-Edge-Policy-DROID",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 b08b12ea8a0..899b4e011dd 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@@ -85,6 +85,8 @@ export interface CatalogGroup {aliases?: readonly string[];/** Capability glyph fallback; the Hub listing's tags win. */capabilities?: Partial<ModelCapabilities>;+ /** A package the load needs that the app does not install, shown as a chip on the row. */+ requires?: string;/** Leads the Recommended list whatever the dropdown sort, in catalog order among pinned groups. */pinToTop?: boolean;/** With `pinToTop`: every row of this group (its GGUF too) leads before the next pinned group's@@ -704,7 +706,14 @@ export const VIDEO_CATALOG: CatalogGroup[] = [}),],},- // Not Cosmos3 Nano: its checkpoint enables the guardrail, whose package Studio does not install.+ {+ canonicalId: "nvidia/Cosmos3-Nano",+ displayName: "Cosmos3 Nano",+ description: "Text and image to video up to 720p · needs cosmos-guardrail",+ scope: "video",+ requires: "cosmos-guardrail",+ artifacts: [bf16Pipeline("nvidia/Cosmos3-Nano", 32, { totalParams: 15750057456 })],+ },{canonicalId: "nvidia/Cosmos3-Edge",displayName: "Cosmos3 Edge",@@ -1164,7 +1173,8 @@ export function curatedRowLabelFor(tags: twin ? ["llama.cpp"] : [],};}- if (hit.group.artifacts.length <= 1) return { name: qualify(hit.group.displayName), tags: [] };+ const needs = hit.group.requires ? [`needs ${hit.group.requires}`] : [];+ if (hit.group.artifacts.length <= 1) return { name: qualify(hit.group.displayName), tags: needs };const [format, ...rest] = hit.artifact.label.split(LABEL_PART_SEPARATOR);// The chip is the stored precision; "Safetensors" is left off (the format dot says it).const tags = [format.trim()].filter((tag) => tag && tag.toLowerCase() !== "safetensors");@@ -1177,7 +1187,7 @@ export function curatedRowLabelFor(kept.length > 0? `${hit.group.displayName} (${kept.join(LABEL_PART_SEPARATOR)})`: hit.group.displayName;- return { name: qualify(name), tags };+ return { name: qualify(name), tags: [...tags, ...needs] };}/** Back-compat: the flat ModelOption list the ModelSelector `models` prop expects, one option per ARTIFACT. */diff --git a/studio/frontend/tests/dense-quant-prequant-routing.test.ts b/studio/frontend/tests/dense-quant-prequant-routing.test.tsindex 50076c6bfc1..f8c6e5a8cb4 100644--- a/studio/frontend/tests/dense-quant-prequant-routing.test.ts+++ b/studio/frontend/tests/dense-quant-prequant-routing.test.ts@@ -353,8 +353,12 @@ test("the Wan2.1 rows are sized by the bf16 weights the backend keeps resident",});test("the Cosmos3 rows are sized by the bf16 weights the backend keeps resident", () => {+ // Backend bf16_components_gb: Nano 30.4 + 0 + 1.4, Edge 6.7 + 0 + 1.4.+ const NANO = "nvidia/Cosmos3-Nano";const EDGE = "nvidia/Cosmos3-Edge";- assert.equal(artifactForRepoId("nvidia/Cosmos3-Nano", VIDEO_CATALOG), null);+ assert.equal(artifactForRepoId(NANO, VIDEO_CATALOG)?.artifact.approxSizeGb, 32);+ assert.equal(curatedArtifactFitsDevice(NANO, VIDEO_CATALOG, onCard(48)), true);+ assert.equal(curatedArtifactFitsDevice(NANO, VIDEO_CATALOG, onCard(40)), false);assert.equal(artifactForRepoId(EDGE, VIDEO_CATALOG)?.artifact.approxSizeGb, 9);assert.equal(curatedArtifactFitsDevice(EDGE, VIDEO_CATALOG, onCard(16)), true);assert.equal(curatedArtifactFitsDevice(EDGE, VIDEO_CATALOG, onCard(12)), false);diff --git a/studio/frontend/tests/unsloth-support-cosmos3.test.ts b/studio/frontend/tests/unsloth-support-cosmos3.test.tsindex ecb449cfe13..ce598450d2b 100644--- a/studio/frontend/tests/unsloth-support-cosmos3.test.ts+++ b/studio/frontend/tests/unsloth-support-cosmos3.test.ts@@ -5,6 +5,11 @@ import assert from "node:assert/strict";import test from "node:test";import { classifyUnslothSupport } from "../src/features/hub/lib/unsloth-support.ts";+import {+ VIDEO_CATALOG,+ catalogToModelOptions,+ curatedRowLabelFor,+} from "../src/features/model-picker/components/model-selector/model-catalog.ts";// nvidia/Cosmos3-* cards name no pipeline task (library "cosmos") and tag diffusers.const HUB_CARD = {@@ -14,11 +19,13 @@ const HUB_CARD = {};const UNSUPPORTED = { status: "unsupported", reason: "Library: diffusers." };-test("only nvidia's Cosmos3 Edge is routed to the Video page; Nano, siblings and copies stay unsupported", () => {+test("nvidia's Cosmos3 Nano and Edge are routed to the Video page; siblings and copies stay unsupported", () => {const cases: Array<[string, object]> = [["nvidia/Cosmos3-Edge", { ...UNSUPPORTED, supportedIn: "video" }],["NVIDIA/cosmos3-edge", { ...UNSUPPORTED, supportedIn: "video" }],- ["nvidia/Cosmos3-Nano", UNSUPPORTED],+ ["nvidia/Cosmos3-Nano", { ...UNSUPPORTED, supportedIn: "video" }],+ ["NVIDIA/cosmos3-nano", { ...UNSUPPORTED, supportedIn: "video" }],+ ["someone/Cosmos3-Nano", UNSUPPORTED],["nvidia/Cosmos3-Nano-FP8", UNSUPPORTED],["nvidia/Cosmos3-Edge-Policy-DROID", UNSUPPORTED],["nvidia/Cosmos3-Nano-Reasoner", UNSUPPORTED],@@ -29,6 +36,21 @@ test("only nvidia's Cosmos3 Edge is routed to the Video page; Nano, siblings and}});+test("the Video picker lists Cosmos3 Nano beside Edge, and the Nano row names the guardrail it needs", () => {+ const rows = catalogToModelOptions(VIDEO_CATALOG);+ const nano = rows.find((row) => row.id === "nvidia/Cosmos3-Nano");+ assert.ok(nano, "nvidia/Cosmos3-Nano missing from the Video picker");+ assert.ok(rows.some((row) => row.id === "nvidia/Cosmos3-Edge"));+ assert.equal(nano.name, "Cosmos3 Nano");+ assert.match(nano.description ?? "", /cosmos-guardrail/);+});++test("the Nano row carries a visible cosmos-guardrail chip; Edge carries none", () => {+ // The picker draws these tags beside the name; the description is only searchable.+ assert.deepEqual(curatedRowLabelFor("nvidia/Cosmos3-Nano", VIDEO_CATALOG)?.tags, ["needs cosmos-guardrail"]);+ assert.deepEqual(curatedRowLabelFor("nvidia/Cosmos3-Edge", VIDEO_CATALOG)?.tags, []);+});+test("a video-to-video pipeline tag is not routed to the Video page (Nano's continuation is gated on status)", () => {const result = classifyUnslothSupport({modelId: "someone/any-video-to-video",