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: identify models in download progress (#15335)

Daniel Hanf8c231d4867a
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index 858e5284f84..d31eff44486 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -4127,7 +4127,7 @@ export function ImagesPage({
advanced = { ...advanced, engine: engineFor(repoId, opts, advanced) ?? "auto" };
}
if (source !== "hub" && !downloadOnly) return handleLoadRef.current(repoId, opts, advanced);
- const pickToastId = downloadOnly ? undefined : pickToast.show();
+ const pickToastId = downloadOnly ? undefined : pickToast.show(opts.displayRepoId ?? repoId);
// Read before the await: a pick made meanwhile replaces quantRevert. Download-only owns no slot.
const ownRevert = downloadSnapshot || downloadOnly ? null : quantRevert.current;
// Acted on outside the try: a throwing refusal would otherwise fall through to the load.
diff --git a/studio/frontend/src/features/studio/training-start-overlay.tsx b/studio/frontend/src/features/studio/training-start-overlay.tsx
index bbef76fa2ab..1c6ebd6283a 100644
--- a/studio/frontend/src/features/studio/training-start-overlay.tsx
+++ b/studio/frontend/src/features/studio/training-start-overlay.tsx
@@ -161,6 +161,7 @@ const PROGRESS_INDICATOR_CLASS =
type ResourceRowProps = {
label: string;
+ resourceName?: string | null;
state: DownloadState;
preparation: PreparationProgress | null;
};
@@ -176,6 +177,7 @@ export function resourceRowHasContent(
// One row per resource: the transfer, then its preparation step once bytes stop.
function ResourceRow({
label,
+ resourceName,
state,
preparation,
}: ResourceRowProps): ReactElement | null {
@@ -240,6 +242,9 @@ function ResourceRow({
{percentLabel}
</span>
</div>
+ {resourceName ? (
+ <div className="break-all text-ui-11 text-foreground/90">{resourceName}</div>
+ ) : null}
{sizeLabel ? (
<div className="text-ui-11 tabular-nums text-muted-foreground">
{sizeLabel}
@@ -457,6 +462,7 @@ export function TrainingStartOverlay({
<AnimatedSpan className="mt-3">
<ResourceRow
label={t("studio.trainingStart.modelWeights")}
+ resourceName={modelName}
state={modelDownload}
preparation={modelPreparation}
/>
diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsx
index 3bc41f63aad..ef5b44bb484 100644
--- a/studio/frontend/src/features/video/video-page.tsx
+++ b/studio/frontend/src/features/video/video-page.tsx
@@ -2810,7 +2810,7 @@ function VideoGenerator({
if (!owns()) return true;
const advanced = currentLoadAdvanced(opts.kind, familyOverrideRequired);
if (source !== "hub") return handleLoadRef.current(repoId, opts, advanced);
- const pickToastId = pickToast.show();
+ const pickToastId = pickToast.show(opts.displayRepoId ?? repoId);
// Read before the await: a newer pick replaces quantRevert.
const ownRevert = quantRevert.current;
let incompatible: string | null = null;
diff --git a/studio/frontend/src/lib/diffusion-pick-toast.ts b/studio/frontend/src/lib/diffusion-pick-toast.ts
index 57718ec471d..7fa98dbed33 100644
--- a/studio/frontend/src/lib/diffusion-pick-toast.ts
+++ b/studio/frontend/src/lib/diffusion-pick-toast.ts
@@ -17,12 +17,12 @@ export interface StagedPlanProgress extends PickToastProgress {
}
export interface PickToastOptions {
- describe: (phase: PickToastPhase, progress: PickToastProgress | null) => unknown;
+ describe: (phase: PickToastPhase, progress: PickToastProgress | null, modelName?: string) => unknown;
classNames?: Record<string, string>;
}
export interface PickToast {
- show: () => string;
+ show: (modelName?: string) => string;
dismiss: (id: string | undefined) => void;
dismissAll: () => void;
setPhase: (id: string | undefined, phase: PickToastPhase, plan?: number) => void;
@@ -40,6 +40,7 @@ export function createPickToast({ describe, classNames }: PickToastOptions): Pic
phase: PickToastPhase;
plan?: number;
progress: PickToastProgress | null;
+ modelName?: string;
} | null = null;
const render = () => {
@@ -47,7 +48,7 @@ export function createPickToast({ describe, classNames }: PickToastOptions): Pic
const id = live.id;
toast(null, {
id,
- description: describe(live.phase, live.progress) as never,
+ description: describe(live.phase, live.progress, live.modelName) as never,
duration: Infinity,
closeButton: true,
...(classNames ? { classNames } : {}),
@@ -59,10 +60,10 @@ export function createPickToast({ describe, classNames }: PickToastOptions): Pic
};
return {
- show: () => {
+ show: (modelName) => {
if (live) toast.dismiss(live.id);
seq += 1;
- live = { id: `diffusion-pick:${seq}`, phase: "preparing", progress: null };
+ live = { id: `diffusion-pick:${seq}`, phase: "preparing", progress: null, modelName };
render();
return live.id;
},
@@ -79,7 +80,7 @@ export function createPickToast({ describe, classNames }: PickToastOptions): Pic
},
setPhase: (id, phase, plan) => {
if (id === undefined || live?.id !== id) return;
- live = { id, phase, plan: phase === "downloading" ? plan : undefined, progress: null };
+ live = { ...live, phase, plan: phase === "downloading" ? plan : undefined, progress: null };
render();
},
progress: (progress) => {
diff --git a/studio/frontend/src/lib/use-diffusion-pick-toast.tsx b/studio/frontend/src/lib/use-diffusion-pick-toast.tsx
index 060e8ca433f..8a32981e3a7 100644
--- a/studio/frontend/src/lib/use-diffusion-pick-toast.tsx
+++ b/studio/frontend/src/lib/use-diffusion-pick-toast.tsx
@@ -19,11 +19,11 @@ const PICK_TOAST_CLASSNAMES = {
description: "mt-0 w-full",
};
-function describePick(phase: PickToastPhase, progress: PickToastProgress | null) {
+function describePick(phase: PickToastPhase, progress: PickToastProgress | null, modelName?: string) {
if (phase === "downloading") {
return (
<ModelLoadDescription
- title="Downloading model…"
+ title={modelName ? `Downloading ${modelName}…` : "Downloading model…"}
message="The model loads once its files are downloaded."
progressPercent={
progress ? (progress.downloadedBytes / progress.totalBytes) * 100 : null
@@ -39,7 +39,7 @@ function describePick(phase: PickToastPhase, progress: PickToastProgress | null)
if (phase === "queued") {
return (
<ModelLoadDescription
- title="Download queued"
+ title={modelName ? `Download queued: ${modelName}` : "Download queued"}
message="It starts once the current download finishes."
/>
);
@@ -47,7 +47,7 @@ function describePick(phase: PickToastPhase, progress: PickToastProgress | null)
if (phase === "waiting") {
return (
<ModelLoadDescription
- title="Model downloaded"
+ title={modelName ? `Downloaded ${modelName}` : "Model downloaded"}
message="It loads once the other downloads finish."
/>
);
@@ -55,14 +55,14 @@ function describePick(phase: PickToastPhase, progress: PickToastProgress | null)
if (phase === "ready") {
return (
<ModelLoadDescription
- title="Model downloaded"
+ title={modelName ? `Downloaded ${modelName}` : "Model downloaded"}
message="It loads when you return to this page."
/>
);
}
return (
<ModelLoadDescription
- title="Preparing download…"
+ title={modelName ? `Preparing ${modelName} download…` : "Preparing download…"}
message="Checking which files this model needs."
/>
);
diff --git a/studio/frontend/tests/diffusion-pick-toast.test.ts b/studio/frontend/tests/diffusion-pick-toast.test.ts
index eb1c3b27e10..4c90dc4b9f5 100644
--- a/studio/frontend/tests/diffusion-pick-toast.test.ts
+++ b/studio/frontend/tests/diffusion-pick-toast.test.ts
@@ -38,6 +38,30 @@ test("a pick raises its toast at once, before any plan or download", () => {
);
});
+test("each pick keeps its model name through phase and progress updates", () => {
+ calls.length = 0;
+ const pick = createPickToast({
+ describe: (phase, progress, modelName) => ({ phase, progress, modelName }),
+ });
+ const id = pick.show("unsloth/flux-3-image-klein-FP8");
+ pick.setPhase(id, "downloading", 1);
+ pick.progress({ downloadedBytes: 10, totalBytes: 17, plan: 1 });
+ pick.setPhase(id, "waiting");
+ for (const call of shown()) {
+ assert.equal(
+ (call.options?.description as { modelName: string }).modelName,
+ "unsloth/flux-3-image-klein-FP8",
+ );
+ }
+ const next = pick.show("another/model");
+ calls.length = 0;
+ pick.setPhase(id, "ready");
+ pick.setPhase(next, "downloading", 2);
+ assert.deepEqual(shown().map((c) => c.options?.description), [
+ { phase: "downloading", progress: null, modelName: "another/model" },
+ ]);
+});
+
test("a newer pick replaces the older toast, and the stale pick cannot touch it", () => {
const pick = make();
const older = pick.show();
diff --git a/tests/studio/playwright_image_download_cancel_retry.py b/tests/studio/playwright_image_download_cancel_retry.py
index 3ac173ed4a2..03a871013db 100644
--- a/tests/studio/playwright_image_download_cancel_retry.py
+++ b/tests/studio/playwright_image_download_cancel_retry.py
@@ -470,7 +470,8 @@ def main() -> None:
if not CHECKPOINT_CACHED:
assert "Model file" in panel_text
assert page.get_by_text("Downloading model requirements", exact = False).count() == 0
- pick_toast = page.locator("[data-sonner-toast]").filter(has_text = "Downloading model…")
+ # The pick toast names the picked repo (#15335).
+ pick_toast = page.locator("[data-sonner-toast]").filter(has_text = f"Downloading {REPO_ID}…")
if DOWNLOAD_ONLY:
assert pick_toast.count() == 0
else: