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: keep the Read aloud speech model loaded beside the chat model (#14191)
Etherlf969957da809
diff --git a/studio/frontend/scripts/check-bundle-budget.ts b/studio/frontend/scripts/check-bundle-budget.tsindex d0bc7070ed2..4504db9e8b4 100644--- a/studio/frontend/scripts/check-bundle-budget.ts+++ b/studio/frontend/scripts/check-bundle-budget.ts@@ -262,8 +262,12 @@ export const BUDGET = {// one machine and build, Node 24, chunk count unchanged at 96): the picker and the folder reconciliation live in the// create dialog, which the eager sidebar imports. Raised to the measured build plus the same 160 B raw / 189 B// transfer margin.- transferBytes: 2_059_496,- rawBytes: 6_839_446,+ // Keeping the Read aloud speech model loaded beside the chat model (#14191) adds 1,442 B raw / 723 B transfer+ // (6,826,504 -> 6,827,946 B raw, 2,054,599 -> 2,055,322 B transfer against 9faa995217, one machine and build,+ // Node 24, chunk count unchanged at 96): the speech slot routing, evicted-model reports and Voice tab rows sit in+ // the audio hook, chat adapter and settings chunks the startup set already loads. Raised by that growth.+ transferBytes: 2_060_219,+ rawBytes: 6_840_888,};// The chunk count is reported but not budgeted. Splitting a page out of the entry raises it while lowering thediff --git a/studio/frontend/src/features/audio/api.ts b/studio/frontend/src/features/audio/api.tsindex 12bc333530d..8b26a42100b 100644--- a/studio/frontend/src/features/audio/api.ts+++ b/studio/frontend/src/features/audio/api.ts@@ -86,6 +86,34 @@ export async function fetchAudioCatalog(): Promise<AudioCatalogResponse> {return parseJson<AudioCatalogResponse>(response);}+// The speech model kept beside the chat model (routing id, status name); null when it is the active one.+let audioSlotModel: string | null = null;+let audioSlotLabel: string | null = null;++export function setAudioSlotModel(+ model: string | null,+ label: string | null = model,+): void {+ audioSlotModel = model;+ audioSlotLabel = model ? label : null;+}++export function audioSlotRoutingId(+ model: string | null | undefined,+): string | null {+ return model && audioSlotModel && model === audioSlotLabel+ ? audioSlotModel+ : null;+}++export function isAudioSlotModel(model: string | null | undefined): boolean {+ return audioSlotRoutingId(model) !== null;+}++function withAudioSlotModel<T extends object>(body: T): T {+ return audioSlotModel ? { ...body, model: audioSlotModel } : body;+}+export async function generateAudio(text: string,options: GenerateAudioOptions = {},@@ -94,11 +122,13 @@ export async function generateAudio(const response = await authFetch("/api/inference/audio/generate", {method: "POST",headers: { "Content-Type": "application/json" },- body: JSON.stringify({- messages: [{ role: "user", content: text }],- stream: false,- ...sampling,- }),+ body: JSON.stringify(+ withAudioSlotModel({+ messages: [{ role: "user", content: text }],+ stream: false,+ ...sampling,+ }),+ ),signal,});return parseJson<GenerateAudioResponse>(response);@@ -507,7 +537,7 @@ export async function runAudio(const response = await authFetch("/api/inference/audio/run", {method: "POST",headers: { "Content-Type": "application/json" },- body: JSON.stringify(buildAudioRunBody(request)),+ body: JSON.stringify(withAudioSlotModel(buildAudioRunBody(request))),signal,});return parseAudioJson<AudioRunResponse>(response);diff --git a/studio/frontend/src/features/audio/audio-page-policy.ts b/studio/frontend/src/features/audio/audio-page-policy.tsindex 0543d6d71d0..ca7a0f599bf 100644--- a/studio/frontend/src/features/audio/audio-page-policy.ts+++ b/studio/frontend/src/features/audio/audio-page-policy.ts@@ -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 { InferenceStatusResponse } from "@/features/chat";import type { ModelSelectorChangeMeta } from "@/features/model-picker/components/model-selector/types";import { nativeAudioCheckpointIsLoadable } from "../model-picker/components/model-selector/audio-picker-policy.ts";import {@@ -796,3 +797,62 @@ export function reconcileSttSelection({}return preservePending ? selectedRepo : null;}++/** The audio model the Audio page shows, generates with and ejects. A kept model is never promoted,+ * so each other serving model is probed (GET /status?model=). */+export async function describeAudioSlot(+ primary: InferenceStatusResponse,+ probe: (model: string) => Promise<InferenceStatusResponse>,+): Promise<{+ status: InferenceStatusResponse;+ slotModel: string | null;+ slotLabel: string | null;+}> {+ if (primary.is_audio) {+ return { status: primary, slotModel: null, slotLabel: null };+ }+ const serving = primary.serving ?? [];+ const checkpoints = primary.serving_checkpoints ?? [];+ // A kept model can share the active one's short name: compare checkpoints when sent.+ const primaryId = primary.model_identifier || primary.active_model;+ for (let i = 0; i < serving.length; i++) {+ const checkpoint = checkpoints[i];+ const id = checkpoint || serving[i];+ const isPrimary =+ Boolean(primary.active_model) &&+ (checkpoint ? checkpoint === primaryId : serving[i] === primary.active_model);+ if (!id || isPrimary) {+ continue;+ }+ // An id not held in a slot answers with the primary (the chat model), so only audio counts.+ const slot: InferenceStatusResponse | null = await probe(id).catch(+ () => null,+ );+ // Route by the probed id: a local model's status shows only a short name.+ if (slot?.is_audio && slot.active_model) {+ return { status: slot, slotModel: id, slotLabel: slot.active_model };+ }+ }+ // No audio model loaded: never let Eject or the header act on the chat model.+ return {+ status: {+ ...primary,+ active_model: null,+ model_identifier: null,+ gguf_variant: null,+ is_audio: false,+ },+ slotModel: null,+ slotLabel: null,+ };+}++/** The audio model a keep-others speech load replaces, by its unload id, else two would stay loaded. */+export function audioModelToReplace(+ status: InferenceStatusResponse | null | undefined,+ target: string,+): string | null {+ if (!status?.is_audio || !status.active_model) return null;+ const current = status.model_identifier || status.active_model;+ return current !== target && status.active_model !== target ? current : null;+}diff --git a/studio/frontend/src/features/audio/audio-page.tsx b/studio/frontend/src/features/audio/audio-page.tsxindex 5bb1e88d2b8..4ff62cc7fb0 100644--- a/studio/frontend/src/features/audio/audio-page.tsx+++ b/studio/frontend/src/features/audio/audio-page.tsx@@ -15,7 +15,11 @@ import { GuidedTour, useGuidedTourController } from "@/features/tour";import { buildAudioTourSteps } from "./tour";import { useSidebar } from "@/components/ui/sidebar";import { usePlatformStore } from "@/config/env";-import { type InferenceStatusResponse, getInferenceStatus } from "@/features/chat";+import {+ type InferenceStatusResponse,+ getInferenceStatus,+ syncKeepModelsLoaded,+} from "@/features/chat";import { useHubInventory } from "@/features/hub";import { useInventoryVersion } from "@/features/hub/stores/inventory-events";import { ModelSelector } from "@/features/model-picker/components/model-selector";@@ -41,6 +45,7 @@ import {type AudioGalleryClip,audioInputAlive,fetchAudioBlob,+ setAudioSlotModel,uploadAudioInput,} from "./api";import {@@ -50,6 +55,7 @@ import {audioGenerationPresentation,audioLoadedSelection,deleteCoversRememberedModel,+ describeAudioSlot,rememberedModelIsGone,rememberedModelUnavailable,settledDeleteMarkers,@@ -317,9 +323,16 @@ export function AudioPage({try {const next = await getInferenceStatus();if (generation !== ttsStatusRefreshGeneration.current) return;- setStatus(next);+ syncKeepModelsLoaded(next.multi_model_mode);+ const view = await describeAudioSlot(next, (model) =>+ getInferenceStatus(undefined, model),+ );+ if (generation !== ttsStatusRefreshGeneration.current) return;+ setAudioSlotModel(view.slotModel, view.slotLabel);+ setStatus(view.status);} catch {if (generation !== ttsStatusRefreshGeneration.current) return;+ setAudioSlotModel(null);// Do not leave Generate enabled against residency the backend can no longer confirm. A later// refresh adopts the recovered runtime.setStatus(null);diff --git a/studio/frontend/src/features/audio/hooks/use-audio-model-slot.ts b/studio/frontend/src/features/audio/hooks/use-audio-model-slot.tsindex e24ba22ea47..80851a39774 100644--- a/studio/frontend/src/features/audio/hooks/use-audio-model-slot.ts+++ b/studio/frontend/src/features/audio/hooks/use-audio-model-slot.ts@@ -2,6 +2,7 @@// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0import { useCallback, useEffect, useRef, useState } from "react";+import { isAccountOwner } from "@/features/auth";import {cancelPreStreamRunReservations,confirmStopRunningChatsIfNeeded,@@ -11,6 +12,7 @@ import {offloadCountsFrom,offloadWarning,requestLocalPromptQueueStop,+ syncKeepModelsLoaded,unloadModel,useChatRuntimeStore,} from "@/features/chat";@@ -25,9 +27,15 @@ import type {ModelSelectorChangeMeta,} from "@/features/model-picker/components/model-selector/types";import { confirmRemoteCodeIfNeeded } from "@/features/security";+import { updateMultiModelMode } from "../../settings/api/multi-model";+import {+ evictedSlotsFrom,+ evictedToastOptions,+ resyncEvicted,+} from "@/lib/evicted-toast";import { fetchSystemInfo } from "@/hooks/use-system";import { toast } from "@/lib/toast";-import { getAudioDownloadPlan } from "../api";+import { audioSlotRoutingId, getAudioDownloadPlan } from "../api";import {type AudioFailureContext,audioFailureActions,@@ -35,6 +43,7 @@ import {} from "../audio-failure-actions";import {audioCppRuntimeProblem,+ audioModelToReplace,canTransitionAudioMode,exactGgufLoadSelector,expectedGgufDownloadBytes,@@ -78,6 +87,27 @@ import type { SttSidecar } from "./use-stt-sidecar";const STT_STATUS_POLL_MS = 30_000;+/** Offered after a speech load replaced the chat model under Off. */+async function keepBothLoaded(): Promise<void> {+ try {+ const mode = await updateMultiModelMode(+ "fit",+ "Failed to save model memory settings.",+ );+ syncKeepModelsLoaded(mode);+ toast.success("Keep multiple models loaded is now When they fit", {+ description:+ "Pick the chat model again and Unsloth keeps it beside the speech model.",+ });+ } catch (error) {+ toast.error(+ error instanceof Error+ ? error.message+ : "Failed to save model memory settings.",+ );+ }+}+/** What the page lends a failed load's toast action: it owns the selector, device and runtime update. */export type AudioLoadFailureHandlers = Pick<AudioFailureContext,@@ -173,6 +203,10 @@ export function useAudioModelSlot({deviceOverride?: "cpu";} | null>(null);const ttsLoadGeneration = useRef(0);+ const statusRef = useRef(status);+ useEffect(() => {+ statusRef.current = status;+ }, [status]);const pendingTtsLoad = useRef<{generation: number;repoId: string;@@ -237,7 +271,16 @@ export function useAudioModelSlot({}const releaseLifecycle = () =>useChatRuntimeStore.getState().endModelLoading(lifecycleLease);- const stopDecision = await confirmStopRunningChatsIfNeeded();+ // A load kept beside the chat model leaves its chats running, as Chat's own keep-others load does.+ const keepsChat = useChatRuntimeStore.getState().keepModelsLoaded;+ const stopDecision = keepsChat+ ? {+ proceed: true,+ forceCancelActive: false,+ promptQueueThreadIds: [],+ preStreamRunTokens: [],+ }+ : await confirmStopRunningChatsIfNeeded();if (!stopDecision.proceed) {releaseLifecycle();ttsLoadInFlight.current = false;@@ -287,7 +330,15 @@ export function useAudioModelSlot({ttsLoadInFlight.current = true;busyRef.current = "loading";setBusy("loading");- const toastId = toast.loading(`Loading ${audioModelLabel(repoId)}…`);+ const replacesChat =+ !useChatRuntimeStore.getState().keepModelsLoaded &&+ !statusRef.current?.is_audio &&+ (statusRef.current?.serving?.length ?? 0) > 0;+ const toastId = toast.loading(`Loading ${audioModelLabel(repoId)}…`, {+ description: replacesChat+ ? "Keep multiple models loaded is Off, so this unloads the chat model."+ : undefined,+ });try {const hfToken = hfApiToken(getHfToken()) ?? null;let trustRemoteCode = remoteCodeApproval?.trustRemoteCode ?? false;@@ -314,6 +365,19 @@ export function useAudioModelSlot({}const wantsCpu = deviceOverride === "cpu" || audioDevice === "cpu";const isGgufLoad = isGgufTtsTarget({ repoId, ggufFilename, loadId, isGguf });+ // Unloaded just before /load goes out: as a third model, Always refuses a load that only+ // fits in its place, and a load cancelled before then (token prompt, abort) keeps it.+ const previous = keepsChat+ ? audioModelToReplace(statusRef.current, loadId || repoId)+ : null;+ // A refused unload (e.g. 409 while it reads aloud) stops the switch: loaded beside it, the+ // old model would keep answering Read aloud and the Audio page.+ const replacePrevious = previous+ ? () =>+ unloadModel({+ model_path: audioSlotRoutingId(previous) ?? previous,+ })+ : undefined;const res = await loadModel({model_path: loadId || repoId,@@ -326,6 +390,8 @@ export function useAudioModelSlot({gguf_variant: ggufFilename ?? null,trust_remote_code: trustRemoteCode,approved_remote_code_fingerprint: approvedRemoteCodeFingerprint,+ // The server ignores this under Off.+ alongside: true,audio_device: wantsCpu ? "cpu" : "auto",// GGUF ignores audio_device; an absent speculative_type means auto, which may attach a GPU drafter....(wantsCpu && isGgufLoad@@ -340,11 +406,14 @@ export function useAudioModelSlot({{signal: controller.signal,runtime: "tts",+ beforeRequest: replacePrevious,onRequestStart: () => {pending.requestStarted = true;// Cancel queued prompts only once /load is really sent: loadModel can return without sending.- cancelPreStreamRunReservations(stopDecision.preStreamRunTokens);- requestLocalPromptQueueStop(stopDecision.promptQueueThreadIds);+ if (!keepsChat) {+ cancelPreStreamRunReservations(stopDecision.preStreamRunTokens);+ requestLocalPromptQueueStop(stopDecision.promptQueueThreadIds);+ }},},);@@ -352,14 +421,23 @@ export function useAudioModelSlot({if (res.is_audio && isTtsAudioType(res.audio_type)) {const offloadNotice = offloadWarning(offloadCountsFrom(res));const showToast = offloadNotice ? toast.warning : toast.success;+ const evicted = evictedSlotsFrom(res);showToast(`Model loaded (${loadedAudioKind(res.audio_type)})${offloadNotice?.titleSuffix ?? ""}`,{id: toastId,- description: offloadNotice?.description,- duration: offloadNotice ? 8000 : undefined,+ description:+ offloadNotice?.description ??+ evictedToastOptions(evicted).description,+ duration: offloadNotice || replacesChat ? 8000 : undefined,+ // The mode is an installation setting: a managed account's save is refused.+ action:+ replacesChat && isAccountOwner()+ ? { label: "Keep both loaded", onClick: () => void keepBothLoaded() }+ : undefined,},);+ resyncEvicted(evicted, "audio");// Only on success: a failed attempt leaves the previous model resident.lastTtsLoad.current = retryLoad;const loadedWorkflow = workflowForLoadedModel({@@ -1050,10 +1128,18 @@ export function useAudioModelSlot({setBusy("unloading");void (async () => {try {- const stopDecision = await confirmStopRunningChatsIfNeeded(- "Unloading the model",- "unload",- );+ // A speech model beside the chat model unloads alone, so the chats keep running.+ const slotModel = audioSlotRoutingId(activeModel);+ const slotEject =+ slotModel !== null || (statusRef.current?.serving?.length ?? 0) > 1;+ const stopDecision = slotEject+ ? {+ proceed: true,+ forceCancelActive: false,+ promptQueueThreadIds: [],+ preStreamRunTokens: [],+ }+ : await confirmStopRunningChatsIfNeeded("Unloading the model", "unload");if (!stopDecision.proceed) {setBusy(null);return;@@ -1066,13 +1152,15 @@ export function useAudioModelSlot({const toastId = toast.loading("Unloading model…");try {- cancelPreStreamRunReservations(stopDecision.preStreamRunTokens);- requestLocalPromptQueueStop(stopDecision.promptQueueThreadIds);+ if (!slotEject) {+ cancelPreStreamRunReservations(stopDecision.preStreamRunTokens);+ requestLocalPromptQueueStop(stopDecision.promptQueueThreadIds);+ }await unloadModel({- model_path: activeModel,+ model_path: slotModel ?? activeModel,force_cancel_active: stopDecision.forceCancelActive,});- requestLocalPromptQueueStop();+ if (!slotEject) requestLocalPromptQueueStop();await refreshStatus();toast.success("Model unloaded", { id: toastId, duration: 1200 });} catch (error) {diff --git a/studio/frontend/src/features/chat/adapters/studio-speech-synthesis-adapter.ts b/studio/frontend/src/features/chat/adapters/studio-speech-synthesis-adapter.tsindex 9b81891aaff..5c01b13c477 100644--- a/studio/frontend/src/features/chat/adapters/studio-speech-synthesis-adapter.ts+++ b/studio/frontend/src/features/chat/adapters/studio-speech-synthesis-adapter.ts@@ -4,8 +4,13 @@import { TTS_MAX_TOKENS } from "@/features/audio/audio-workspace-constants";import { authFetch } from "@/features/auth";import { useVoiceSettingsStore } from "@/features/settings/stores/voice-settings-store";+import { formatApiErrorBody } from "@/lib/format-fastapi-error";import { toast } from "@/lib/toast";import type { SpeechSynthesisAdapter } from "@assistant-ui/react";+import {+ audioModelsFromCatalog,+ loadedSpeechModelId,+} from "../../settings/api/openai-model-catalog";import { encryptProviderApiKey } from "../api/providers-api";import { getExternalProviderApiKey } from "../external-providers";import { stripSearchImageTokens } from "../search-images/search-images";@@ -219,12 +224,63 @@ export function createConfiguredUtterance(return utterance;}+/** Named because an unnamed request reaches the active (chat) model; null leaves it unnamed. */+async function resolveReadAloudModel(+ wantsClone: boolean,+ signal?: AbortSignal,+): Promise<string | null> {+ try {+ const res = await authFetch("/v1/models", { signal });+ if (!res.ok) return null;+ return loadedSpeechModelId(+ audioModelsFromCatalog(await res.json()),+ wantsClone,+ );+ } catch (error) {+ if (signal?.aborted) throw error;+ return null;+ }+}++function readAloudError(+ detail: string,+ model: string | null,+ voiceId: string,+): Error {+ if (/no model loaded|not an audio model/i.test(detail)) {+ return new Error(+ "No Unsloth speech model is loaded. Open Audio › Text to Speech and load one, then try again.",+ );+ }+ // The named model was unloaded after the listing (an image or video load, or idle unload).+ if (model && /downloaded but not loaded|is not loaded/i.test(detail)) {+ return new Error(+ "The Unsloth speech model for read aloud is no longer loaded. Load it again in Audio › Text to Speech.",+ );+ }+ // Only this 404 is about the voice; another one (a model hidden from the account) must not+ // drop the user's choice.+ if (voiceId && /saved voice no longer exists/i.test(detail)) {+ useVoiceSettingsStore.getState().setTtsStudioVoiceId("");+ return new Error(+ "The saved voice for read aloud no longer exists. Read aloud now uses the model's own voice.",+ );+ }+ if (voiceId && /can clone a voice/i.test(detail)) {+ return new Error(+ "The loaded model can't use saved voices. Load a voice-cloning model in Audio › Text to Speech, or choose Model's own voice in Settings → Voice.",+ );+ }+ return new Error(detail);+}+/** Generate speech via the loaded TTS audio model; returns a WAV data URL. */export async function generateStudioTtsAudio(text: string,signal?: AbortSignal,): Promise<string> {const { ttsStudioVoiceId } = useVoiceSettingsStore.getState();+ const model = await resolveReadAloudModel(Boolean(ttsStudioVoiceId), signal);const response = await authFetch("/api/inference/audio/generate", {method: "POST",headers: { "Content-Type": "application/json" },@@ -234,34 +290,19 @@ export async function generateStudioTtsAudio(// Read aloud is not a Speak run, so it stays out of Speak's history.persist: false,max_tokens: TTS_MAX_TOKENS,+ ...(model ? { model } : {}),...(ttsStudioVoiceId ? { voice_id: ttsStudioVoiceId } : {}),}),signal,});if (!response.ok) {- const body = (await response.json().catch(() => null)) as {- detail?: string;- } | null;- const detail = body?.detail ?? `HTTP ${response.status}`;- if (/no model loaded|not an audio model/i.test(detail)) {- throw new Error(- "No speech model is loaded. Open Audio and load one in Speak, then try again.",- );- }- // Only this 404 is about the voice; another one (a model hidden from the account) must not- // drop the user's choice.- if (ttsStudioVoiceId && /saved voice no longer exists/i.test(detail)) {- useVoiceSettingsStore.getState().setTtsStudioVoiceId("");- throw new Error(- "The saved voice for read aloud no longer exists. Read aloud now uses the model's own voice.",- );- }- if (ttsStudioVoiceId && /can clone a voice/i.test(detail)) {- throw new Error(- "The loaded model can't use saved voices. Load a voice-cloning model in Audio, or choose Model's own voice in Settings → Voice.",- );- }- throw new Error(detail);+ // Some refusals nest the message ({detail: {error: {message}}}), so read it like other routes.+ const body: unknown = await response.json().catch(() => null);+ throw readAloudError(+ formatApiErrorBody(body) ?? `HTTP ${response.status}`,+ model,+ ttsStudioVoiceId,+ );}const data = (await response.json()) as {audio?: { data?: string };diff --git a/studio/frontend/src/features/chat/api/chat-adapter.ts b/studio/frontend/src/features/chat/api/chat-adapter.tsindex f3c73bb6ef3..71dda68782a 100644--- a/studio/frontend/src/features/chat/api/chat-adapter.ts+++ b/studio/frontend/src/features/chat/api/chat-adapter.ts@@ -448,12 +448,24 @@ import {supportsChatGenerationRuns,} from "./chat-generation-api";import { isDurableRunCandidate, turnRequiresLegacyStream } from "./durable-gate";+import {+ evictedSlotsFrom,+ resyncEvicted,+ toastEvicted,+} from "@/lib/evicted-toast";import {type OffloadCounts,offloadCountsFrom,offloadWarning,} from "../lib/partial-offload";+/** Say what an automatic chat load unloaded to make room, e.g. the speech model read aloud uses. */+function reportEvicted(loadResp: unknown): void {+ const slots = evictedSlotsFrom(loadResp);+ toastEvicted(slots);+ resyncEvicted(slots, "chat");+}+// Small models (<=9B) answer from memory, so "auto" forces retrieval for them.const AUTOINJECT_AUTO_MAX_SIZE_B = 9;@@ -3812,6 +3824,8 @@ async function autoLoadSmallestModel(options?: AutoLoadOptions): Promise<{options?.abortSignal?.throwIfAborted();const loadResp = await loadModel({model_path: modelPath,+ // Keep a speech model loaded for read aloud when Keep multiple models loaded allows it.+ alongside: true,hf_token: hfToken,max_seq_length: fitMaxSeqLength,load_in_4bit: config.loadIn4bit !== false,@@ -3858,6 +3872,7 @@ async function autoLoadSmallestModel(options?: AutoLoadOptions): Promise<{noteLoadFailure(failureLabel, error);throw error;});+ reportEvicted(loadResp);// Do not apply this load to the visible runtime once its queue was cancelled; still await// /load so the lifecycle stays serialized.options?.abortSignal?.throwIfAborted();@@ -4284,6 +4299,7 @@ async function autoLoadSmallestModel(options?: AutoLoadOptions): Promise<{options?.abortSignal?.throwIfAborted();const loadResp = await loadModel({model_path: DEFAULT_CHAT_MODEL_REPO,+ alongside: true,hf_token: hfToken,// Model default under both modes: Auto layers + no pin means resolveFitMaxSeqLength returns 0.max_seq_length: 0,@@ -4304,6 +4320,7 @@ async function autoLoadSmallestModel(options?: AutoLoadOptions): Promise<{n_cpu_moe: 0,gpu_ids: defaultGpuIds ?? undefined,});+ reportEvicted(loadResp);options?.abortSignal?.throwIfAborted();applyAutoLoadRuntimeState(options, () => {saveSpeculativeType(specSettings.speculativeType);diff --git a/studio/frontend/src/features/chat/api/chat-api.ts b/studio/frontend/src/features/chat/api/chat-api.tsindex a0567a8ba11..f4f483012e2 100644--- a/studio/frontend/src/features/chat/api/chat-api.ts+++ b/studio/frontend/src/features/chat/api/chat-api.ts@@ -393,6 +393,8 @@ export async function loadModel(options?: {signal?: AbortSignal;onRequestStart?: () => void;+ /** Awaited once the load is going out, after the token prompt and abort check. */+ beforeRequest?: () => Promise<void>;/** What is taking the slot. Chat ignores its own loads when reconciling, so an Audio load* announced as "chat" left chat naming a model it had evicted. */runtime?: ModelRuntime;@@ -406,6 +408,7 @@ export async function loadModel(});if (options?.signal?.aborted)throw options.signal.reason ?? new DOMException("Aborted", "AbortError");+ await options?.beforeRequest?.();options?.onRequestStart?.();// Announced after the token prompt, so a cancelled load never shows a row. The indicator// otherwise had nothing to show until its next 5s poll.diff --git a/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts b/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.tsindex cdb28ec491a..ebcbfca0f0e 100644--- a/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts+++ b/studio/frontend/src/features/chat/hooks/use-chat-model-runtime.ts@@ -127,6 +127,7 @@ import {resolvePreserveThinkingOnLoad,resolveToolsEnabledOnLoad,saveSpeculativeType,+ syncKeepModelsLoaded,takeEffortDisplacedByPin,useChatRuntimeStore,type LoadingModelPick,@@ -725,6 +726,7 @@ async function syncInferenceStatusToStore(options?: {if (signal?.aborted || superseded()) return;+ syncKeepModelsLoaded(statusRes.multi_model_mode);setModels(listRes.models.map(toChatModelRow));publishLoadedModels(statusRes.serving ?? [],@@ -811,7 +813,7 @@ async function syncInferenceStatusToStore(options?: {});// A known prior resident or a definitive speech-only owner both prove the// persisted Chat pick is stale. Do not clear for a Chat load that this tab- // started. TTS is different because it owns this same slot.+ // started. A TTS load without Keep multiple models loaded takes this same slot.if ((wasResident || isSpeechOnlyStatus(statusRes)) &&selectedCheckpoint &&diff --git a/studio/frontend/src/features/chat/index.ts b/studio/frontend/src/features/chat/index.tsindex 026b6d588df..822c082c184 100644--- a/studio/frontend/src/features/chat/index.ts+++ b/studio/frontend/src/features/chat/index.ts@@ -61,7 +61,10 @@ export {type InferenceParams,type Preset,} from "./chat-settings-sheet";-export { useChatRuntimeStore } from "./stores/chat-runtime-store";+export {+ syncKeepModelsLoaded,+ useChatRuntimeStore,+} from "./stores/chat-runtime-store";export { openFolderAsProject, useOpeningFolder } from "./utils/open-folder-as-project";export { requestReplyFinishedPermission } from "./utils/reply-finished-notification";export {diff --git a/studio/frontend/src/features/chat/stores/chat-runtime-store.ts b/studio/frontend/src/features/chat/stores/chat-runtime-store.tsindex 8798026e46c..4f4bb56cd1d 100644--- a/studio/frontend/src/features/chat/stores/chat-runtime-store.ts+++ b/studio/frontend/src/features/chat/stores/chat-runtime-store.ts@@ -6320,3 +6320,12 @@ export function resolveSpeculativeSettingsForLoad({: null,};}++/** So a session that never opened Chat or Settings knows the mode; older servers send none. */+export function syncKeepModelsLoaded(mode: unknown): void {+ if (mode !== "off" && mode !== "fit" && mode !== "always") return;+ const keep = mode !== "off";+ if (useChatRuntimeStore.getState().keepModelsLoaded !== keep) {+ useChatRuntimeStore.getState().setKeepModelsLoaded(keep);+ }+}diff --git a/studio/frontend/src/features/chat/types/api.ts b/studio/frontend/src/features/chat/types/api.tsindex 8ab8f124abc..bafd6aef365 100644--- a/studio/frontend/src/features/chat/types/api.ts+++ b/studio/frontend/src/features/chat/types/api.ts@@ -419,6 +419,8 @@ export interface InferenceStatusResponse {serving?: string[];/** Per `serving` entry, the id to select, load and unload it by: a local model's path. */serving_checkpoints?: string[];+ /** Keep multiple models loaded, as saved on the server. Absent from older servers. */+ multi_model_mode?: "off" | "fit" | "always";inference?: {temperature?: number;top_p?: number;diff --git a/studio/frontend/src/features/settings/api/openai-model-catalog.ts b/studio/frontend/src/features/settings/api/openai-model-catalog.tsindex a9a70af4622..77632f9ec99 100644--- a/studio/frontend/src/features/settings/api/openai-model-catalog.ts+++ b/studio/frontend/src/features/settings/api/openai-model-catalog.ts@@ -88,6 +88,20 @@ export function audioModelsFromCatalog(body: unknown): AudioApiModel[] {);}+/** A loaded TTS model that can "speak"; a saved voice prefers one that can "clone", which the+ * server runs as a clone. */+export function loadedSpeechModelId(+ models: AudioApiModel[],+ wantsClone = false,+): string | null {+ const loaded = models.filter((m) => m.loaded && m.task === "text-to-speech");+ const cloner = wantsClone+ ? loaded.find((m) => m.workflows?.includes("clone"))+ : undefined;+ const speaker = loaded.find((m) => m.workflows?.includes("speak"));+ return (cloner ?? speaker)?.id ?? null;+}+const AUDIO_CATALOG_RETRY_MS = 15000;const AUDIO_CATALOG_IDLE_MS = 60000;diff --git a/studio/frontend/src/features/settings/tabs/voice-tab.tsx b/studio/frontend/src/features/settings/tabs/voice-tab.tsxindex b251f02f1be..367534bb0b0 100644--- a/studio/frontend/src/features/settings/tabs/voice-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/voice-tab.tsx@@ -24,6 +24,8 @@ import {isAudioCppFolderId,} from "@/features/audio/audio-cpp-catalog";import { useAudioVoicesStore } from "@/features/audio/stores/audio-voices-store";+import { useIsAccountOwner } from "@/features/auth";+import { audioModelLabel } from "../../audio/audio-workspace-utils";import {type SttDownloadStatus,StudioModelDictationAdapter,@@ -35,6 +37,7 @@ import {generateStudioTtsAudio,isDecisionConnection,loadSttModel,+ syncKeepModelsLoaded,releaseTtsAudioUrl,startSttDownload,sttEngineFor,@@ -68,6 +71,17 @@ import { useNavigate } from "@tanstack/react-router";import { SquareIcon } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { resetMicrophonePermission } from "../api/microphone-permission";+import {+ type MultiModelMode,+ loadMultiModelMode,+ updateMultiModelMode,+} from "../api/multi-model";+import {+ type AudioApiModel,+ loadedSpeechModelId,+ watchAudioModels,+} from "../api/openai-model-catalog";+import { listOpenAIAudioModels } from "../api/openai-models";import { DictationDictionaryView } from "../components/dictation-dictionary-view";import { RecentDictationsView } from "../components/recent-dictations-view";import { SettingsRow } from "../components/settings-row";@@ -478,6 +492,7 @@ function useSystemVoices() {export function VoiceTab() {const t = useT();+ const isOwner = useIsAccountOwner();const micDeviceId = useVoiceSettingsStore((s) => s.micDeviceId);const setMicDeviceId = useVoiceSettingsStore((s) => s.setMicDeviceId);const dictationEngine = useVoiceSettingsStore((s) => s.dictationEngine);@@ -595,6 +610,51 @@ export function VoiceTab() {}}, [effectiveTtsEngine]);+ // Which speech model read aloud would use, and whether loading one unloads the chat model.+ const [audioModels, setAudioModels] = useState<AudioApiModel[]>([]);+ const [multiModelMode, setMultiModelMode] = useState<MultiModelMode | null>(+ null,+ );+ const [savingMultiModel, setSavingMultiModel] = useState(false);+ useEffect(() => {+ if (effectiveTtsEngine !== "studio") return;+ let stale = false;+ loadMultiModelMode(t("settings.resources.modelMemory.loadError")).then(+ (mode) => {+ if (!stale) setMultiModelMode(mode);+ },+ () => {},+ );+ const stop = watchAudioModels(listOpenAIAudioModels, setAudioModels);+ return () => {+ stale = true;+ stop();+ };+ }, [effectiveTtsEngine, t]);+ const loadedTtsModel = loadedSpeechModelId(+ audioModels,+ Boolean(ttsStudioVoiceId),+ );+ const keepBothLoaded = async () => {+ setSavingMultiModel(true);+ try {+ const mode = await updateMultiModelMode(+ "fit",+ t("settings.resources.modelMemory.saveError"),+ );+ setMultiModelMode(mode);+ syncKeepModelsLoaded(mode);+ } catch (error) {+ toast.error(+ error instanceof Error+ ? error.message+ : t("settings.resources.modelMemory.saveError"),+ );+ } finally {+ setSavingMultiModel(false);+ }+ };+// A deleted voice would otherwise stay selected and every read aloud would fail on it.const hasSelectedStudioVoice = savedVoices.some((voice) => voice.id === ttsStudioVoiceId,@@ -1695,7 +1755,13 @@ export function VoiceTab() {<><SettingsRowlabel={t("settings.voice.readAloud.modelLabel")}- description={t("settings.voice.readAloud.modelDescription")}+ description={+ loadedTtsModel+ ? t("settings.voice.readAloud.modelLoaded", {+ model: audioModelLabel(loadedTtsModel),+ })+ : t("settings.voice.readAloud.modelDescription")+ }>{/* The row named the model selector but offered no way to reach it. */}<Button@@ -1717,6 +1783,24 @@ export function VoiceTab() {{t("settings.voice.readAloud.openAudioAction")}</Button></SettingsRow>+ {/* Owner only, like Resources: a managed account's save is refused. */}+ {multiModelMode === "off" && isOwner ? (+ <SettingsRow+ label={t("settings.voice.readAloud.keepBothLabel")}+ description={t(+ "settings.voice.readAloud.keepBothDescription",+ )}+ >+ <Button+ variant="outline"+ size="sm"+ disabled={savingMultiModel}+ onClick={() => void keepBothLoaded()}+ >+ {t("settings.voice.readAloud.keepBothAction")}+ </Button>+ </SettingsRow>+ ) : null}<SettingsRowlabel={t("settings.voice.readAloud.voiceLabel")}description={t(diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 7a6fdf9a297..5f074e43e1f 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -1609,9 +1609,9 @@ export const ar = {autoDescription: "قراءة كل رد بصوت عالٍ فور اكتماله",engineLabel: "محرك TTS",engineSystemDescription: "الأصوات المدمجة في الجهاز",- engineStudioDescription: "يستخدم النموذج الصوتي المُحمَّل في قسم الصوت",+ engineStudioDescription: "يتحدث بنموذج محمّل في الصوت › تحويل النص إلى كلام",engineSystem: "أصوات النظام",- engineStudio: "تحميل نموذج TTS",+ engineStudio: "نموذج Unsloth",engineCustom: "نقطة نهاية مخصصة",engineCustomDescription:"خادم TTS متوافق مع OpenAI من اتصالاتك (مثل Kokoro)",@@ -1623,8 +1623,11 @@ export const ar = {customVoiceDescription:"اسم الصوت الذي تتوقعه نقطة النهاية؛ القيمة الافتراضية alloy",modelLabel: "نموذج TTS",- modelDescription:- "حمّل نموذجًا صوتيًا في قسم الصوت. سيحلّ محل نموذج الدردشة.",+ modelDescription: "لا يوجد نموذج محمّل. حمّل واحدًا في الصوت › تحويل النص إلى كلام.",+ modelLoaded: "{model} محمّل",+ keepBothLabel: "إبقاء نموذج الدردشة محمّلًا",+ keepBothDescription: "خيار «إبقاء عدة نماذج محمّلة» على «إيقاف»، لذا يؤدي تحميل نموذج صوتي إلى تفريغ نموذج الدردشة.",+ keepBothAction: "إبقاء الاثنين محمّلين",openAudioAction: "فتح الصوت",voiceLabel: "الصوت",voiceDescription: "أفضل الأصوات على هذا الجهاز",@@ -2359,12 +2362,12 @@ export const ar = {multiModelOff: "إيقاف",multiModelFit: "عندما تتسع",multiModelAlways: "دائمًا",- multiModelDescription: "عند تحميل نموذج محادثة أو صور أو فيديو تُفرَّغ النماذج الأخرى.",+ multiModelDescription: "عند تحميل نموذج محادثة أو صوت أو صور أو فيديو تُفرَّغ النماذج الأخرى.",multiModelDescriptionFit:"عند تحميل نموذج تبقى النماذج الأخرى إن اتسعت لها الذاكرة. وإن لم تتسع، تُفرَّغ أولًا النماذج غير المستخدمة، ثم النموذج النشط.",multiModelDescriptionAlways:"لا يفرّغ تحميل نموذج أي نموذج آخر أبدًا. النموذج الذي لا يتسع لا يُحمَّل. ولا يزال التفريغ التلقائي عند الخمول والتدريب يحرّران الذاكرة.",- multiModelHint: "يشمل نماذج المحادثة والصور والفيديو. يجيب كل نموذج محادثة محمّل عن الطلبات التي تذكره بالاسم. مع عدة كروت رسوميات، يحاول Unsloth وضع النموذج الجديد على كرت لا يستخدمه نموذج آخر. يترك خيار «عندما تتسع» نحو 1 جيجابايت فارغة. ولا يفرّغ الخياران «عندما تتسع» و«دائمًا» أبدًا نموذجًا على كرت آخر.",+ multiModelHint: "يشمل نماذج المحادثة والصوت والصور والفيديو. يجيب كل نموذج محادثة محمّل عن الطلبات التي تذكره بالاسم. مع عدة كروت رسوميات، يحاول Unsloth وضع النموذج الجديد على كرت لا يستخدمه نموذج آخر. يترك خيار «عندما تتسع» نحو 1 جيجابايت فارغة. ولا يفرّغ الخياران «عندما تتسع» و«دائمًا» أبدًا نموذجًا على كرت آخر.",mediaIdleUnloadDescription:"حرّر ذاكرة VRAM بتفريغ نموذجَي الصور والفيديو بعد هذا العدد من ثواني الخمول. تُبقي القيمة 0 النموذجين محمَّلين، والحد الأدنى 60 ثانية.",mlockVetoed: "يبقى --mlock معطَّلاً: تثبيت النموذج سيحجز ذاكرة تكفي حجمه كاملاً. ولا يزال التفريغ التلقائي عند الخمول معطَّلاً.",@@ -2377,7 +2380,7 @@ export const ar = {modelMemoryKeywords:"mlock memlock ulimit vram gpu ذاكرة رام مقيم تثبيت قفل إبقاء محمل تفريغ خامل mmap no-mmap load-mode تبديل ترحيل",multiModelKeywords:- "عدة نماذج متعددة معًا تبديل تتسع تفريغ إخلاء vram gpu صور فيديو محادثة دائمًا خامل",+ "عدة نماذج متعددة معًا تبديل تتسع تفريغ إخلاء vram gpu صور فيديو محادثة دائمًا خامل كلام صوت نطق قراءة بصوت عال tts",mediaIdleUnloadKeywords:"صور فيديو انتشار خامل تفريغ ttl مهلة ثواني تحرير vram gpu ذاكرة",},diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex 0d94727e8d7..210607cadf5 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -1621,9 +1621,9 @@ export const de = {autoDescription: "Jede Antwort vorlesen, sobald sie fertig ist",engineLabel: "TTS-Engine",engineSystemDescription: "Auf dem Gerät integrierte Stimmen",- engineStudioDescription: "Verwendet das in Audio geladene Sprachmodell",+ engineStudioDescription: "Spricht mit einem in Audio › Sprachausgabe geladenen Modell",engineSystem: "Systemstimmen",- engineStudio: "TTS-Modell laden",+ engineStudio: "Unsloth-Modell",engineCustom: "Eigener Endpunkt",engineCustomDescription:"Ein OpenAI-kompatibler TTS-Server aus deinen Verbindungen (z. B. Kokoro)",@@ -1635,8 +1635,11 @@ export const de = {customVoiceDescription:"Vom Endpunkt erwarteter Stimmenname; Standard ist alloy",modelLabel: "TTS-Modell",- modelDescription:- "Laden Sie ein Sprachmodell in Audio. Es ersetzt das Chat-Modell.",+ modelDescription: "Keines geladen. Laden Sie eines unter Audio › Sprachausgabe.",+ modelLoaded: "{model} ist geladen",+ keepBothLabel: "Chat-Modell geladen lassen",+ keepBothDescription: "„Mehrere Modelle geladen lassen“ ist auf „Aus“ gestellt, daher wird beim Laden eines Sprachmodells das Chat-Modell entladen.",+ keepBothAction: "Beide geladen lassen",openAudioAction: "Audio öffnen",voiceLabel: "Stimme",voiceDescription: "Beste Stimmen auf diesem Gerät",@@ -2390,12 +2393,12 @@ export const de = {multiModelOff: "Aus",multiModelFit: "Wenn sie passen",multiModelAlways: "Immer",- multiModelDescription: "Beim Laden eines Chat-, Bild- oder Videomodells werden die anderen entladen.",+ multiModelDescription: "Beim Laden eines Chat-, Sprach-, Bild- oder Videomodells werden die anderen entladen.",multiModelDescriptionFit:"Beim Laden eines Modells bleiben die anderen geladen, wenn sie passen. Wenn nicht, werden zuerst die nicht genutzten entladen, danach das aktive.",multiModelDescriptionAlways:"Beim Laden eines Modells wird nie ein anderes entladen. Ein Modell, das nicht passt, wird nicht geladen. Das automatische Entladen im Leerlauf und das Training geben weiterhin Speicher frei.",- multiModelHint: "Gilt für Chat-, Bild- und Videomodelle. Jedes geladene Chat-Modell beantwortet die Anfragen, die es nennen. Bei mehreren GPUs versucht Unsloth, ein neues Modell auf eine GPU zu legen, die kein anderes Modell nutzt. „Wenn sie passen“ lässt etwa 1 GB frei. „Wenn sie passen“ und „Immer“ entladen nie ein Modell auf einer anderen GPU.",+ multiModelHint: "Gilt für Chat-, Sprach-, Bild- und Videomodelle. Jedes geladene Chat-Modell beantwortet die Anfragen, die es nennen. Bei mehreren GPUs versucht Unsloth, ein neues Modell auf eine GPU zu legen, die kein anderes Modell nutzt. „Wenn sie passen“ lässt etwa 1 GB frei. „Wenn sie passen“ und „Immer“ entladen nie ein Modell auf einer anderen GPU.",mediaIdleUnloadDescription:"Gibt VRAM frei, indem die Bild- und Videomodelle nach der angegebenen Anzahl von Sekunden ohne Aktivität entladen werden. Bei 0 bleiben sie geladen; der Mindestwert ist 60.",mlockVetoed: "--mlock bleibt aus: das Fixieren des Modells würde RAM für das gesamte Modell reservieren. Das automatische Entladen im Leerlauf bleibt deaktiviert.",@@ -2408,7 +2411,7 @@ export const de = {modelMemoryKeywords:"mlock memlock ulimit vram gpu speicher arbeitsspeicher ram resident anheften fixieren sperren geladen halten entladen leerlauf mmap no-mmap load-mode auslagern",multiModelKeywords:- "mehrere modelle gleichzeitig zusammen nebeneinander wechseln passen entladen verdrängen vram gpu bild video chat immer leerlauf",+ "mehrere modelle gleichzeitig zusammen nebeneinander wechseln passen entladen verdrängen vram gpu bild video chat immer leerlauf sprache sprachausgabe tts stimme vorlesen",mediaIdleUnloadKeywords:"bild video diffusion leerlauf entladen ttl timeout sekunden freigeben vram gpu speicher",},diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex c7b2fd37f5b..3f23539ee5d 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -1667,9 +1667,9 @@ export const en = {autoDescription: "Read each reply aloud as soon as it finishes",engineLabel: "TTS engine",engineSystemDescription: "Built-in device voices",- engineStudioDescription: "Uses the speech model loaded in Audio",+ engineStudioDescription: "Speaks with a model loaded in Audio › Text to Speech",engineSystem: "System voices",- engineStudio: "Load TTS model",+ engineStudio: "Unsloth model",engineCustom: "Custom endpoint",engineCustomDescription:"An OpenAI-compatible TTS server from your connections (e.g. Kokoro)",@@ -1680,8 +1680,12 @@ export const en = {customModelLabel: "Model",customVoiceDescription: "Voice name the endpoint expects; defaults to alloy",modelLabel: "TTS model",- modelDescription:- "Load a speech model in Audio. It replaces the chat model.",+ modelDescription: "None loaded. Load one in Audio › Text to Speech.",+ modelLoaded: "{model} is loaded",+ keepBothLabel: "Keep the chat model loaded",+ keepBothDescription:+ "Keep multiple models loaded is Off, so loading a speech model unloads the chat model.",+ keepBothAction: "Keep both loaded",openAudioAction: "Open Audio",voiceLabel: "Voice",voiceDescription: "Best voices on this device",@@ -2412,12 +2416,12 @@ export const en = {multiModelOff: "Off",multiModelFit: "When they fit",multiModelAlways: "Always",- multiModelDescription: "Loading a chat, image or video model unloads the other ones.",+ multiModelDescription: "Loading a chat, speech, image or video model unloads the other ones.",multiModelDescriptionFit:"Loading a model keeps the others when they fit. When they don't, it unloads the ones not in use first, then the active one.",multiModelDescriptionAlways:"Loading a model never unloads another. A model that does not fit is not loaded. Idle auto-unload and training still free memory.",- multiModelHint: "Covers chat, image and video models. Each loaded chat model answers the requests that name it. With several GPUs, Unsloth tries to place a new model on a GPU no other model uses. “When they fit” leaves about 1 GB spare. “When they fit” and “Always” never unload a model on another GPU.",+ multiModelHint: "Covers chat, speech, image and video models. Each loaded chat model answers the requests that name it. With several GPUs, Unsloth tries to place a new model on a GPU no other model uses. “When they fit” leaves about 1 GB spare. “When they fit” and “Always” never unload a model on another GPU.",mediaIdleUnloadDescription:"Free VRAM by unloading the image and video models after this many idle seconds. 0 keeps them loaded, minimum 60.",mlockVetoed: "--mlock stays off: pinning the model in place would reserve RAM for all of it. Idle auto-unload is still disabled.",@@ -2430,7 +2434,7 @@ export const en = {modelMemoryKeywords:"mlock memlock ulimit vram gpu memory ram resident residency pin pinned page lock locked keep loaded unload idle mmap no-mmap load-mode swap paging",multiModelKeywords:- "multiple several models together alongside swap fit unload evict vram gpu image video chat always idle",+ "multiple several models together alongside swap fit unload evict vram gpu image video chat speech tts voice read aloud always idle",mediaIdleUnloadKeywords:"image video diffusion idle unload ttl timeout seconds free vram gpu memory",},diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex f30e3481db6..003062e9cf5 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -1618,9 +1618,9 @@ export const es = {autoDescription: "Lee en voz alta cada respuesta en cuanto termina",engineLabel: "Motor de TTS",engineSystemDescription: "Voces integradas del dispositivo",- engineStudioDescription: "Usa el modelo de voz cargado en Audio",+ engineStudioDescription: "Habla con un modelo cargado en Audio › Texto a voz",engineSystem: "Voces del sistema",- engineStudio: "Cargar un modelo de TTS",+ engineStudio: "Modelo de Unsloth",engineCustom: "Endpoint personalizado",engineCustomDescription:"Un servidor TTS compatible con OpenAI de tus conexiones (p. ej., Kokoro)",@@ -1632,8 +1632,11 @@ export const es = {customVoiceDescription:"Nombre de la voz que espera el endpoint; el valor predeterminado es alloy",modelLabel: "Modelo de TTS",- modelDescription:- "Carga un modelo de voz en Audio. Sustituye al modelo del chat.",+ modelDescription: "No hay ninguno cargado. Carga uno en Audio › Texto a voz.",+ modelLoaded: "{model} está cargado",+ keepBothLabel: "Mantener cargado el modelo del chat",+ keepBothDescription: "«Mantener varios modelos cargados» está en «Desactivado», así que cargar un modelo de voz descarga el modelo del chat.",+ keepBothAction: "Mantener ambos cargados",openAudioAction: "Abrir Audio",voiceLabel: "Voz",voiceDescription: "Las mejores voces de este dispositivo",@@ -2385,12 +2388,12 @@ export const es = {multiModelOff: "Desactivado",multiModelFit: "Cuando quepan",multiModelAlways: "Siempre",- multiModelDescription: "Al cargar un modelo de chat, imagen o vídeo, se descargan los demás.",+ multiModelDescription: "Al cargar un modelo de chat, voz, imagen o vídeo, se descargan los demás.",multiModelDescriptionFit:"Al cargar un modelo, los demás se mantienen si caben. Si no caben, primero se descargan los que no se están usando y después el activo.",multiModelDescriptionAlways:"Al cargar un modelo nunca se descarga otro. Un modelo que no cabe no se carga. La descarga automática por inactividad y el entrenamiento siguen liberando memoria.",- multiModelHint: "Se aplica a los modelos de chat, imagen y vídeo. Cada modelo de chat cargado responde a las solicitudes que lo nombran. Con varias GPU, Unsloth intenta colocar un modelo nuevo en una GPU que ningún otro modelo usa. «Cuando quepan» deja aproximadamente 1 GB libre. «Cuando quepan» y «Siempre» nunca descargan un modelo de otra GPU.",+ multiModelHint: "Se aplica a los modelos de chat, voz, imagen y vídeo. Cada modelo de chat cargado responde a las solicitudes que lo nombran. Con varias GPU, Unsloth intenta colocar un modelo nuevo en una GPU que ningún otro modelo usa. «Cuando quepan» deja aproximadamente 1 GB libre. «Cuando quepan» y «Siempre» nunca descargan un modelo de otra GPU.",mediaIdleUnloadDescription:"Libera la VRAM descargando los modelos de imagen y vídeo después de este número de segundos de inactividad. El valor 0 los mantiene cargados; el mínimo es 60.",mlockVetoed: "--mlock permanece desactivado: fijar el modelo reservaría RAM para todo él. La descarga automática por inactividad sigue desactivada.",@@ -2403,7 +2406,7 @@ export const es = {modelMemoryKeywords:"mlock memlock ulimit vram gpu memoria ram residente fijar anclar bloquear mantener cargado descargar inactivo mmap no-mmap load-mode paginacion intercambio",multiModelKeywords:- "varios multiples modelos juntos a la vez cambiar caber descargar expulsar vram gpu imagen video chat siempre inactivo",+ "varios multiples modelos juntos a la vez cambiar caber descargar expulsar vram gpu imagen video chat siempre inactivo voz habla tts leer en voz alta",mediaIdleUnloadKeywords:"imagen video difusion inactivo descargar ttl tiempo de espera segundos liberar vram gpu memoria",},diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 877fa9679c8..46a6b0dd184 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -1620,9 +1620,9 @@ export const fr = {autoDescription: "Lit chaque réponse à voix haute dès qu’elle est terminée",engineLabel: "Moteur TTS",engineSystemDescription: "Voix intégrées à l'appareil",- engineStudioDescription: "Utilise le modèle vocal chargé dans Audio",+ engineStudioDescription: "Parle avec un modèle chargé dans Audio › Synthèse vocale",engineSystem: "Voix du système",- engineStudio: "Charger un modèle TTS",+ engineStudio: "Modèle Unsloth",engineCustom: "Endpoint personnalisé",engineCustomDescription:"Un serveur TTS compatible OpenAI parmi vos connexions (p. ex. Kokoro)",@@ -1634,8 +1634,11 @@ export const fr = {customVoiceDescription:"Nom de la voix attendu par l'endpoint ; alloy par défaut",modelLabel: "Modèle TTS",- modelDescription:- "Chargez un modèle vocal dans Audio. Il remplace le modèle de chat.",+ modelDescription: "Aucun modèle chargé. Chargez-en un dans Audio › Synthèse vocale.",+ modelLoaded: "{model} est chargé",+ keepBothLabel: "Garder le modèle de chat chargé",+ keepBothDescription: "« Garder plusieurs modèles chargés » est sur « Désactivé » : charger un modèle vocal décharge donc le modèle de chat.",+ keepBothAction: "Garder les deux chargés",openAudioAction: "Ouvrir Audio",voiceLabel: "Voix",voiceDescription: "Meilleures voix sur cet appareil",@@ -2389,12 +2392,12 @@ export const fr = {multiModelOff: "Désactivé",multiModelFit: "S'ils tiennent",multiModelAlways: "Toujours",- multiModelDescription: "Charger un modèle de discussion, d'image ou de vidéo décharge les autres.",+ multiModelDescription: "Charger un modèle de discussion, vocal, d'image ou de vidéo décharge les autres.",multiModelDescriptionFit:"Charger un modèle garde les autres s'ils tiennent. Sinon, il décharge d'abord ceux qui ne sont pas utilisés, puis le modèle actif.",multiModelDescriptionAlways:"Charger un modèle n'en décharge jamais un autre. Un modèle qui ne tient pas n'est pas chargé. Le déchargement automatique en veille et l'entraînement libèrent toujours de la mémoire.",- multiModelHint: "Concerne les modèles de discussion, d'image et de vidéo. Chaque modèle de discussion chargé répond aux requêtes qui le nomment. Avec plusieurs GPU, Unsloth essaie de placer un nouveau modèle sur un GPU qu'aucun autre modèle n'utilise. « S'ils tiennent » laisse environ 1 Go libre. « S'ils tiennent » et « Toujours » ne déchargent jamais un modèle sur un autre GPU.",+ multiModelHint: "Concerne les modèles de discussion, vocaux, d'image et de vidéo. Chaque modèle de discussion chargé répond aux requêtes qui le nomment. Avec plusieurs GPU, Unsloth essaie de placer un nouveau modèle sur un GPU qu'aucun autre modèle n'utilise. « S'ils tiennent » laisse environ 1 Go libre. « S'ils tiennent » et « Toujours » ne déchargent jamais un modèle sur un autre GPU.",mediaIdleUnloadDescription:"Libérer la VRAM en déchargeant les modèles d’image et de vidéo après ce nombre de secondes d’inactivité. 0 les maintient chargés ; le minimum est 60.",mlockVetoed: "--mlock reste désactivé : épingler le modèle réserverait de la RAM pour l'intégralité de celui-ci. Le déchargement automatique en veille reste désactivé.",@@ -2407,7 +2410,7 @@ export const fr = {modelMemoryKeywords:"mlock memlock ulimit vram gpu memoire ram resident epingler verrouiller garder charge decharger inactif mmap no-mmap load-mode pagination echange",multiModelKeywords:- "plusieurs modeles ensemble simultanes changer tenir decharger evincer vram gpu image video discussion toujours inactif",+ "plusieurs modeles ensemble simultanes changer tenir decharger evincer vram gpu image video discussion toujours inactif voix parole vocal tts lecture a voix haute",mediaIdleUnloadKeywords:"image video diffusion inactif decharger ttl delai secondes liberer vram gpu memoire",},diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 69d0c75c1ec..a60d3e0f367 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -1715,9 +1715,9 @@ export const he = {autoDescription: "הקראת כל תשובה ברגע שהיא מסתיימת",engineLabel: "מנוע TTS",engineSystemDescription: "קולות מובנים במכשיר",- engineStudioDescription: "משתמש במודל הדיבור שנטען באודיו",+ engineStudioDescription: "מדבר באמצעות מודל שנטען באודיו › טקסט לדיבור",engineSystem: "קולות מערכת",- engineStudio: "טען מודל TTS",+ engineStudio: "מודל Unsloth",engineCustom: "נקודת קצה מותאמת אישית",engineCustomDescription:"שרת TTS תואם OpenAI מהחיבורים שלך (למשל Kokoro)",@@ -1728,7 +1728,11 @@ export const he = {customVoiceDescription:"שם הקול שנקודת הקצה מצפה לו; ברירת מחדל היא alloy",modelLabel: "מודל TTS",- modelDescription: "טען מודל דיבור באודיו. הוא מחליף את מודל הצ'אט.",+ modelDescription: "לא נטען מודל. טען מודל באודיו › טקסט לדיבור.",+ modelLoaded: "{model} נטען",+ keepBothLabel: "השאר את מודל הצ'אט טעון",+ keepBothDescription: "ההגדרה ”השאר מספר מודלים טעונים” במצב ”כבוי”, ולכן טעינת מודל דיבור פורקת את מודל הצ'אט.",+ keepBothAction: "השאר את שניהם טעונים",openAudioAction: "פתח אודיו",voiceLabel: "קול",voiceDescription: "הקולות הטובים ביותר במכשיר זה",@@ -2464,13 +2468,13 @@ export const he = {multiModelOff: "כבוי",multiModelFit: "כשהם נכנסים",multiModelAlways: "תמיד",- multiModelDescription: "טעינת מודל צ'אט, תמונה או וידאו פורקת את האחרים.",+ multiModelDescription: "טעינת מודל צ'אט, דיבור, תמונה או וידאו פורקת את האחרים.",multiModelDescriptionFit:"טעינת מודל משאירה את האחרים כשהם נכנסים. כשלא, היא פורקת תחילה את אלה שאינם בשימוש, ואז את הפעיל.",multiModelDescriptionAlways:"טעינת מודל לעולם אינה פורקת מודל אחר. מודל שאינו נכנס לא נטען. פריקה בחוסר פעילות ואימון עדיין מפנים זיכרון.",multiModelHint:- "חל על מודלי צ'אט, תמונה ווידאו. כל מודל צ'אט טעון עונה לבקשות שמציינות אותו. כשיש כמה מעבדי GPU, Unsloth מנסה למקם מודל חדש ב-GPU שאף מודל אחר אינו משתמש בו. ”כשהם נכנסים” משאיר כ-1 GB פנוי. ”כשהם נכנסים” ו”תמיד” לעולם אינם פורקים מודל ב-GPU אחר.",+ "חל על מודלי צ'אט, דיבור, תמונה ווידאו. כל מודל צ'אט טעון עונה לבקשות שמציינות אותו. כשיש כמה מעבדי GPU, Unsloth מנסה למקם מודל חדש ב-GPU שאף מודל אחר אינו משתמש בו. ”כשהם נכנסים” משאיר כ-1 GB פנוי. ”כשהם נכנסים” ו”תמיד” לעולם אינם פורקים מודל ב-GPU אחר.",mediaIdleUnloadDescription:"פנה VRAM על ידי פריקת מודלי תמונה ווידאו לאחר מספר שניות ללא פעילות. 0 שומר אותם טעונים, מינימום 60.",mlockVetoed:@@ -2485,7 +2489,7 @@ export const he = {modelMemoryKeywords:"mlock memlock ulimit vram gpu memory ram resident residency pin pinned page lock locked keep loaded unload idle mmap no-mmap load-mode swap paging זיכרון קיבוע נעילה תושב השאר טעון פריקה סרק החלפה דפדוף",multiModelKeywords:- "multiple several models together alongside swap fit unload evict vram gpu image video chat always idle מספר מודלים יחד במקביל החלפה נכנס פריקה פינוי תמונה וידאו צ'אט תמיד סרק",+ "multiple several models together alongside swap fit unload evict vram gpu image video chat always idle מספר מודלים יחד במקביל החלפה נכנס פריקה פינוי תמונה וידאו צ'אט תמיד סרק speech tts voice read aloud דיבור קול הקראה",mediaIdleUnloadKeywords:"image video diffusion idle unload ttl timeout seconds free vram gpu memory תמונה וידאו דיפוזיה סרק פריקה זמן קצוב שניות פינוי זיכרון",},diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex ab00026feb7..cf708b6dab4 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -1616,9 +1616,9 @@ export const hi = {autoDescription: "हर जवाब पूरा होते ही ज़ोर से पढ़ें",engineLabel: "TTS इंजन",engineSystemDescription: "डिवाइस की अंतर्निहित आवाज़ें",- engineStudioDescription: "ऑडियो में लोड किए गए स्पीच मॉडल का उपयोग करता है",+ engineStudioDescription: "ऑडियो › टेक्स्ट-टू-स्पीच में लोड किए गए मॉडल से बोलता है",engineSystem: "सिस्टम की आवाज़ें",- engineStudio: "TTS मॉडल लोड करें",+ engineStudio: "Unsloth मॉडल",engineCustom: "कस्टम एंडपॉइंट",engineCustomDescription:"आपके कनेक्शनों में से एक OpenAI-संगत TTS सर्वर (जैसे Kokoro)",@@ -1629,8 +1629,11 @@ export const hi = {customVoiceDescription:"एंडपॉइंट द्वारा अपेक्षित वॉइस नाम; डिफ़ॉल्ट alloy है",modelLabel: "TTS मॉडल",- modelDescription:- "ऑडियो में एक स्पीच मॉडल लोड करें। यह चैट मॉडल की जगह ले लेता है।",+ modelDescription: "कोई लोड नहीं है। ऑडियो › टेक्स्ट-टू-स्पीच में एक लोड करें।",+ modelLoaded: "{model} लोड है",+ keepBothLabel: "चैट मॉडल लोड रखें",+ keepBothDescription: "“कई मॉडल लोड रखें” बंद है, इसलिए स्पीच मॉडल लोड करने पर चैट मॉडल अनलोड हो जाता है।",+ keepBothAction: "दोनों लोड रखें",openAudioAction: "ऑडियो खोलें",voiceLabel: "आवाज़",voiceDescription: "इस डिवाइस पर सबसे अच्छी आवाज़ें",@@ -2365,12 +2368,12 @@ export const hi = {multiModelOff: "बंद",multiModelFit: "जब जगह हो",multiModelAlways: "हमेशा",- multiModelDescription: "चैट, इमेज या वीडियो मॉडल लोड करने पर बाकी मॉडल अनलोड हो जाते हैं।",+ multiModelDescription: "चैट, स्पीच, इमेज या वीडियो मॉडल लोड करने पर बाकी मॉडल अनलोड हो जाते हैं।",multiModelDescriptionFit:"मॉडल लोड करने पर, जगह हो तो बाकी मॉडल बने रहते हैं। जगह न हो, तो पहले इस्तेमाल में न रहे मॉडल अनलोड होते हैं, फिर सक्रिय मॉडल।",multiModelDescriptionAlways:"मॉडल लोड करने पर कोई दूसरा मॉडल कभी अनलोड नहीं होता। जो मॉडल नहीं समाता, वह लोड नहीं होता। निष्क्रियता पर स्वतः अनलोड और ट्रेनिंग अब भी मेमोरी खाली करते हैं।",- multiModelHint: "चैट, इमेज और वीडियो मॉडल पर लागू होता है। हर लोड किया गया चैट मॉडल उन अनुरोधों का जवाब देता है जो उसका नाम लेते हैं। कई GPU होने पर, Unsloth नए मॉडल को ऐसे GPU पर रखने की कोशिश करता है जिसे कोई दूसरा मॉडल इस्तेमाल नहीं कर रहा। “जब जगह हो” लगभग 1 GB खाली छोड़ता है। “जब जगह हो” और “हमेशा” किसी दूसरे GPU पर मौजूद मॉडल को कभी अनलोड नहीं करते।",+ multiModelHint: "चैट, स्पीच, इमेज और वीडियो मॉडल पर लागू होता है। हर लोड किया गया चैट मॉडल उन अनुरोधों का जवाब देता है जो उसका नाम लेते हैं। कई GPU होने पर, Unsloth नए मॉडल को ऐसे GPU पर रखने की कोशिश करता है जिसे कोई दूसरा मॉडल इस्तेमाल नहीं कर रहा। “जब जगह हो” लगभग 1 GB खाली छोड़ता है। “जब जगह हो” और “हमेशा” किसी दूसरे GPU पर मौजूद मॉडल को कभी अनलोड नहीं करते।",mediaIdleUnloadDescription:"इतने सेकंड तक निष्क्रिय रहने के बाद इमेज और वीडियो मॉडल अनलोड करके VRAM खाली करें। 0 पर वे लोड रहते हैं; न्यूनतम 60 सेकंड।",mlockVetoed: "--mlock बंद ही रहता है: मॉडल को पिन करने से उसकी पूरी मात्रा के लिए RAM आरक्षित हो जाएगी। निष्क्रिय होने पर स्वतः अनलोड अब भी अक्षम है।",@@ -2383,7 +2386,7 @@ export const hi = {modelMemoryKeywords:"mlock memlock ulimit vram gpu मेमोरी रैम स्थायी पिन लॉक बनाए रखें लोड अनलोड निष्क्रिय mmap no-mmap load-mode स्वैप पेजिंग",multiModelKeywords:- "कई मॉडल एक साथ स्वैप जगह अनलोड हटाना vram gpu इमेज वीडियो चैट हमेशा निष्क्रिय",+ "कई मॉडल एक साथ स्वैप जगह अनलोड हटाना vram gpu इमेज वीडियो चैट हमेशा निष्क्रिय स्पीच आवाज़ बोलना पढ़कर सुनाना tts",mediaIdleUnloadKeywords:"इमेज वीडियो डिफ्यूजन निष्क्रिय अनलोड ttl टाइमआउट सेकंड खाली vram gpu मेमोरी",},diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex d655bcd015d..1aa6735e0a4 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -1524,9 +1524,9 @@ export const it = {autoDescription: "Legge ad alta voce ogni risposta appena è completa",engineLabel: "Motore TTS",engineSystemDescription: "Voci integrate nel dispositivo",- engineStudioDescription: "Usa il modello vocale caricato in Audio",+ engineStudioDescription: "Parla con un modello caricato in Audio › Sintesi vocale",engineSystem: "Voci di sistema",- engineStudio: "Carica un modello TTS",+ engineStudio: "Modello di Unsloth",engineCustom: "Endpoint personalizzato",engineCustomDescription:"Un server TTS compatibile con OpenAI dalle tue connessioni (ad es. Kokoro)",@@ -1538,8 +1538,11 @@ export const it = {customVoiceDescription:"Nome della voce atteso dall'endpoint; il valore predefinito è alloy",modelLabel: "Modello TTS",- modelDescription:- "Carica un modello vocale in Audio. Sostituisce il modello della chat.",+ modelDescription: "Nessuno caricato. Caricane uno in Audio › Sintesi vocale.",+ modelLoaded: "{model} è caricato",+ keepBothLabel: "Mantieni caricato il modello di chat",+ keepBothDescription: "«Mantieni più modelli caricati» è su «Disattivato», quindi caricare un modello vocale scarica il modello di chat.",+ keepBothAction: "Mantieni entrambi caricati",openAudioAction: "Apri Audio",voiceLabel: "Voce",voiceDescription: "Le migliori voci disponibili su questo dispositivo",@@ -2296,12 +2299,12 @@ export const it = {multiModelOff: "Disattivato",multiModelFit: "Se c'è spazio",multiModelAlways: "Sempre",- multiModelDescription: "Caricare un modello di chat, immagini o video scarica gli altri.",+ multiModelDescription: "Caricare un modello di chat, voce, immagini o video scarica gli altri.",multiModelDescriptionFit:"Caricare un modello mantiene gli altri se c'è spazio. Altrimenti scarica prima quelli non in uso, poi quello attivo.",multiModelDescriptionAlways:"Caricare un modello non ne scarica mai un altro. Un modello che non entra non viene caricato. Lo scaricamento automatico per inattività e l'addestramento liberano comunque memoria.",- multiModelHint: "Vale per i modelli di chat, immagini e video. Ogni modello di chat caricato risponde alle richieste che lo nominano. Con più GPU, Unsloth prova a mettere un nuovo modello su una GPU che nessun altro modello usa. «Se c'è spazio» lascia circa 1 GB libero. «Se c'è spazio» e «Sempre» non scaricano mai un modello su un'altra GPU.",+ multiModelHint: "Vale per i modelli di chat, voce, immagini e video. Ogni modello di chat caricato risponde alle richieste che lo nominano. Con più GPU, Unsloth prova a mettere un nuovo modello su una GPU che nessun altro modello usa. «Se c'è spazio» lascia circa 1 GB libero. «Se c'è spazio» e «Sempre» non scaricano mai un modello su un'altra GPU.",mediaIdleUnloadDescription:"Libera la VRAM scaricando i modelli di immagini e video dopo il numero indicato di secondi di inattività. 0 li mantiene in memoria; il minimo è 60.",mlockVetoed: "--mlock resta disattivato: bloccare il modello riserverebbe RAM per l'intero modello. Lo scaricamento automatico in inattività resta disattivato.",@@ -2314,7 +2317,7 @@ export const it = {modelMemoryKeywords:"mlock memlock ulimit vram gpu memoria ram residente bloccare fissare mantenere caricato scaricare inattivo mmap no-mmap load-mode paginazione swap",multiModelKeywords:- "più modelli insieme contemporaneamente cambio spazio scaricare espellere vram gpu immagini video chat sempre inattivo",+ "più modelli insieme contemporaneamente cambio spazio scaricare espellere vram gpu immagini video chat sempre inattivo voce parlato tts lettura ad alta voce",mediaIdleUnloadKeywords:"immagini video diffusione inattivo scaricare ttl timeout secondi liberare vram gpu memoria",},diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 237a2907a0e..05ba7cdf24e 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -1614,9 +1614,9 @@ export const ja = {autoDescription: "応答が完了するとすぐに読み上げます",engineLabel: "TTS エンジン",engineSystemDescription: "デバイス内蔵の音声",- engineStudioDescription: "音声で読み込んだ音声合成モデルを使用します",+ engineStudioDescription: "音声 › 音声合成で読み込んだモデルで読み上げます",engineSystem: "システムの音声",- engineStudio: "TTS モデルを読み込む",+ engineStudio: "Unsloth モデル",engineCustom: "カスタムエンドポイント",engineCustomDescription:"接続に登録した OpenAI 互換の TTS サーバー(例: Kokoro)",@@ -1627,8 +1627,11 @@ export const ja = {customModelLabel: "モデル",customVoiceDescription: "エンドポイントが期待する音声名(デフォルトは alloy)",modelLabel: "TTS モデル",- modelDescription:- "音声で音声合成モデルを読み込んでください。チャットモデルは置き換えられます。",+ modelDescription: "読み込まれていません。音声 › 音声合成で読み込んでください。",+ modelLoaded: "{model} を読み込み済み",+ keepBothLabel: "チャットモデルを読み込んだままにする",+ keepBothDescription: "「複数のモデルを読み込んだままにする」が「オフ」のため、音声モデルを読み込むとチャットモデルがアンロードされます。",+ keepBothAction: "両方を読み込んだままにする",openAudioAction: "音声を開く",voiceLabel: "音声",voiceDescription: "このデバイスで最適な音声",@@ -2338,12 +2341,12 @@ export const ja = {multiModelOff: "オフ",multiModelFit: "収まる場合",multiModelAlways: "常に",- multiModelDescription: "チャット、画像、動画のモデルを読み込むと、他のモデルはアンロードされます。",+ multiModelDescription: "チャット、音声、画像、動画のモデルを読み込むと、他のモデルはアンロードされます。",multiModelDescriptionFit:"モデルを読み込んでも、収まる場合は他のモデルを残します。収まらない場合は、使用中でないモデルを先にアンロードし、次にアクティブなモデルをアンロードします。",multiModelDescriptionAlways:"モデルを読み込んでも、他のモデルはアンロードされません。収まらないモデルは読み込まれません。アイドル時の自動アンロードとトレーニングでは引き続きメモリが解放されます。",- multiModelHint: "チャット、画像、動画のモデルが対象です。読み込まれた各チャットモデルは、そのモデルを指定したリクエストに応答します。複数の GPU がある場合、Unsloth は新しいモデルを他のモデルが使っていない GPU に配置しようとします。「収まる場合」は約 1 GB の空きを残します。「収まる場合」と「常に」は、別の GPU 上のモデルをアンロードしません。",+ multiModelHint: "チャット、音声、画像、動画のモデルが対象です。読み込まれた各チャットモデルは、そのモデルを指定したリクエストに応答します。複数の GPU がある場合、Unsloth は新しいモデルを他のモデルが使っていない GPU に配置しようとします。「収まる場合」は約 1 GB の空きを残します。「収まる場合」と「常に」は、別の GPU 上のモデルをアンロードしません。",mediaIdleUnloadDescription:"指定した秒数だけアイドル状態が続くと、画像モデルと動画モデルをアンロードして VRAM を解放します。0 にすると読み込んだままになります。最小値は 60 秒です。",mlockVetoed: "--mlock は無効のままです。モデルを固定するとモデル全体分の RAM を確保することになります。アイドル時の自動アンロードは引き続き無効です。",@@ -2356,7 +2359,7 @@ export const ja = {modelMemoryKeywords:"mlock memlock ulimit vram gpu メモリ ram 常駐 固定 ロック 保持 ロード済み アンロード アイドル mmap no-mmap load-mode スワップ ページング",multiModelKeywords:- "複数 モデル 同時 併用 切り替え 収まる アンロード 退避 vram gpu 画像 動画 チャット 常に アイドル",+ "複数 モデル 同時 併用 切り替え 収まる アンロード 退避 vram gpu 画像 動画 チャット 常に アイドル 音声 読み上げ 音声合成 tts",mediaIdleUnloadKeywords:"画像 動画 拡散 アイドル アンロード ttl タイムアウト 秒 解放 vram gpu メモリ",},diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex ce57f00e337..572e0cd9dd5 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -1611,9 +1611,9 @@ export const ko = {autoDescription: "답변이 끝나면 바로 소리 내어 읽습니다",engineLabel: "TTS 엔진",engineSystemDescription: "기기 내장 음성",- engineStudioDescription: "오디오에서 로드된 음성 모델을 사용합니다",+ engineStudioDescription: "오디오 › 텍스트 음성 변환에서 로드한 모델로 읽어 줍니다",engineSystem: "시스템 음성",- engineStudio: "TTS 모델 로드",+ engineStudio: "Unsloth 모델",engineCustom: "사용자 지정 엔드포인트",engineCustomDescription:"연결에 저장된 OpenAI 호환 TTS 서버 (예: Kokoro)",@@ -1624,8 +1624,11 @@ export const ko = {customModelLabel: "모델",customVoiceDescription: "엔드포인트가 기대하는 음성 이름 (기본값: alloy)",modelLabel: "TTS 모델",- modelDescription:- "오디오에서 음성 모델을 로드하세요. 채팅 모델을 대체합니다.",+ modelDescription: "로드된 모델이 없습니다. 오디오 › 텍스트 음성 변환에서 로드하세요.",+ modelLoaded: "{model} 로드됨",+ keepBothLabel: "채팅 모델 로드 상태 유지",+ keepBothDescription: "'여러 모델을 로드된 상태로 유지'가 '끄기'로 설정되어 있어, 음성 모델을 로드하면 채팅 모델이 언로드됩니다.",+ keepBothAction: "둘 다 로드 상태 유지",openAudioAction: "오디오 열기",voiceLabel: "음성",voiceDescription: "기기에서 사용 가능한 최적의 음성",@@ -2353,12 +2356,12 @@ export const ko = {multiModelOff: "끄기",multiModelFit: "공간이 있을 때",multiModelAlways: "항상",- multiModelDescription: "채팅, 이미지, 동영상 모델을 로드하면 다른 모델은 언로드됩니다.",+ multiModelDescription: "채팅, 음성, 이미지, 동영상 모델을 로드하면 다른 모델은 언로드됩니다.",multiModelDescriptionFit:"모델을 로드할 때 공간이 있으면 다른 모델을 유지합니다. 공간이 없으면 사용하지 않는 모델을 먼저 언로드하고, 그다음 활성 모델을 언로드합니다.",multiModelDescriptionAlways:"모델을 로드해도 다른 모델을 언로드하지 않습니다. 공간이 부족한 모델은 로드되지 않습니다. 유휴 시 자동 언로드와 학습은 여전히 메모리를 확보합니다.",- multiModelHint: "채팅, 이미지, 동영상 모델에 적용됩니다. 로드된 각 채팅 모델은 해당 모델을 지정한 요청에 응답합니다. GPU가 여러 개이면 Unsloth는 다른 모델이 사용하지 않는 GPU에 새 모델을 배치하려고 합니다. '공간이 있을 때'는 약 1GB를 남겨 둡니다. '공간이 있을 때'와 '항상'은 다른 GPU에 있는 모델을 언로드하지 않습니다.",+ multiModelHint: "채팅, 음성, 이미지, 동영상 모델에 적용됩니다. 로드된 각 채팅 모델은 해당 모델을 지정한 요청에 응답합니다. GPU가 여러 개이면 Unsloth는 다른 모델이 사용하지 않는 GPU에 새 모델을 배치하려고 합니다. '공간이 있을 때'는 약 1GB를 남겨 둡니다. '공간이 있을 때'와 '항상'은 다른 GPU에 있는 모델을 언로드하지 않습니다.",mediaIdleUnloadDescription:"지정한 유휴 시간(초)이 지나면 이미지와 동영상 모델을 해제하여 VRAM을 확보합니다. 0으로 설정하면 계속 로드된 상태로 유지됩니다. 최소 60초입니다.",mlockVetoed: "--mlock은 꺼진 상태로 유지됩니다. 모델을 고정하면 모델 전체 크기만큼 RAM을 예약하게 됩니다. 유휴 시 자동 언로드는 계속 비활성화됩니다.",@@ -2371,7 +2374,7 @@ export const ko = {modelMemoryKeywords:"mlock memlock ulimit vram gpu 메모리 ram 상주 고정 잠금 유지 로드됨 언로드 유휴 mmap no-mmap load-mode 스왑 페이징",multiModelKeywords:- "여러 모델 동시 함께 전환 공간 언로드 해제 vram gpu 이미지 동영상 채팅 항상 유휴",+ "여러 모델 동시 함께 전환 공간 언로드 해제 vram gpu 이미지 동영상 채팅 항상 유휴 음성 읽어주기 소리 내어 읽기 tts",mediaIdleUnloadKeywords:"이미지 동영상 디퓨전 유휴 해제 언로드 ttl 시간 초과 초 확보 vram gpu 메모리",},diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex caafc97acf3..1ee065f98f0 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -1616,9 +1616,9 @@ export const ptBR = {autoDescription: "Lê cada resposta em voz alta assim que ela termina",engineLabel: "Mecanismo de TTS",engineSystemDescription: "Vozes nativas do dispositivo",- engineStudioDescription: "Usa o modelo de fala carregado em Áudio",+ engineStudioDescription: "Fala com um modelo carregado em Áudio › Conversão de texto em fala",engineSystem: "Vozes do sistema",- engineStudio: "Carregar modelo de TTS",+ engineStudio: "Modelo do Unsloth",engineCustom: "Endpoint personalizado",engineCustomDescription:"Um servidor TTS compatível com OpenAI das suas conexões (ex.: Kokoro)",@@ -1630,8 +1630,11 @@ export const ptBR = {customVoiceDescription:"Nome da voz esperado pelo endpoint; o padrão é alloy",modelLabel: "Modelo de TTS",- modelDescription:- "Carregue um modelo de fala em Áudio. Ele substitui o modelo do chat.",+ modelDescription: "Nenhum carregado. Carregue um em Áudio › Conversão de texto em fala.",+ modelLoaded: "{model} está carregado",+ keepBothLabel: "Manter o modelo do chat carregado",+ keepBothDescription: "“Manter vários modelos carregados” está em “Desativado”, então carregar um modelo de fala descarrega o modelo do chat.",+ keepBothAction: "Manter os dois carregados",openAudioAction: "Abrir Áudio",voiceLabel: "Voz",voiceDescription: "As melhores vozes deste dispositivo",@@ -2373,12 +2376,12 @@ export const ptBR = {multiModelOff: "Desativado",multiModelFit: "Quando couberem",multiModelAlways: "Sempre",- multiModelDescription: "Carregar um modelo de chat, imagem ou vídeo descarrega os outros.",+ multiModelDescription: "Carregar um modelo de chat, fala, imagem ou vídeo descarrega os outros.",multiModelDescriptionFit:"Carregar um modelo mantém os outros quando eles cabem. Quando não cabem, descarrega primeiro os que não estão em uso e depois o ativo.",multiModelDescriptionAlways:"Carregar um modelo nunca descarrega outro. Um modelo que não cabe não é carregado. A descarga automática por inatividade e o treinamento ainda liberam memória.",- multiModelHint: "Vale para modelos de chat, imagem e vídeo. Cada modelo de chat carregado responde às solicitações que o nomeiam. Com várias GPUs, o Unsloth tenta colocar um novo modelo em uma GPU que nenhum outro modelo usa. “Quando couberem” deixa cerca de 1 GB livre. “Quando couberem” e “Sempre” nunca descarregam um modelo em outra GPU.",+ multiModelHint: "Vale para modelos de chat, fala, imagem e vídeo. Cada modelo de chat carregado responde às solicitações que o nomeiam. Com várias GPUs, o Unsloth tenta colocar um novo modelo em uma GPU que nenhum outro modelo usa. “Quando couberem” deixa cerca de 1 GB livre. “Quando couberem” e “Sempre” nunca descarregam um modelo em outra GPU.",mediaIdleUnloadDescription:"Libera a VRAM descarregando os modelos de imagem e vídeo após esta quantidade de segundos de inatividade. 0 os mantém carregados; o mínimo é 60.",mlockVetoed: "--mlock continua desativado: fixar o modelo reservaria RAM para todo ele. A descarga automática por inatividade continua desativada.",@@ -2391,7 +2394,7 @@ export const ptBR = {modelMemoryKeywords:"mlock memlock ulimit vram gpu memoria ram residente fixar travar manter carregado descarregar ocioso mmap no-mmap load-mode paginacao swap",multiModelKeywords:- "varios multiplos modelos juntos simultaneos trocar caber descarregar remover vram gpu imagem video chat sempre ocioso",+ "varios multiplos modelos juntos simultaneos trocar caber descarregar remover vram gpu imagem video chat sempre ocioso fala voz tts ler em voz alta",mediaIdleUnloadKeywords:"imagem video difusao ocioso descarregar ttl tempo limite segundos liberar vram gpu memoria",},diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 36d1a65f31e..6fe486239ea 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -1615,9 +1615,9 @@ export const ru = {autoDescription: "Читать каждый ответ вслух сразу после завершения",engineLabel: "Движок TTS",engineSystemDescription: "Встроенные голоса устройства",- engineStudioDescription: "Использует модель речи, загруженную в Аудио",+ engineStudioDescription: "Озвучивает моделью, загруженной в Аудио › Синтез речи",engineSystem: "Системные голоса",- engineStudio: "Загрузить модель TTS",+ engineStudio: "Модель Unsloth",engineCustom: "Пользовательский эндпоинт",engineCustomDescription:"OpenAI-совместимый TTS-сервер из ваших подключений (например, Kokoro)",@@ -1629,8 +1629,11 @@ export const ru = {customVoiceDescription:"Имя голоса, которое ожидает эндпоинт; по умолчанию alloy",modelLabel: "Модель TTS",- modelDescription:- "Загрузите модель речи в Аудио. Она заменит модель чата.",+ modelDescription: "Ничего не загружено. Загрузите модель в Аудио › Синтез речи.",+ modelLoaded: "{model} загружена",+ keepBothLabel: "Оставить модель чата загруженной",+ keepBothDescription: "«Держать несколько моделей загруженными» выключено («Выкл.»), поэтому при загрузке модели речи модель чата выгружается.",+ keepBothAction: "Оставить обе загруженными",openAudioAction: "Открыть Аудио",voiceLabel: "Голос",voiceDescription: "Лучшие голоса на этом устройстве",@@ -2370,12 +2373,12 @@ export const ru = {multiModelOff: "Выкл.",multiModelFit: "Если помещаются",multiModelAlways: "Всегда",- multiModelDescription: "При загрузке модели чата, изображений или видео остальные выгружаются.",+ multiModelDescription: "При загрузке модели чата, речи, изображений или видео остальные выгружаются.",multiModelDescriptionFit:"При загрузке модели остальные остаются, если помещаются. Если нет, сначала выгружаются неиспользуемые, затем активная.",multiModelDescriptionAlways:"Загрузка модели никогда не выгружает другую. Модель, которая не помещается, не загружается. Автовыгрузка по простою и обучение по-прежнему освобождают память.",- multiModelHint: "Относится к моделям чата, изображений и видео. Каждая загруженная модель чата отвечает на запросы, в которых она указана. При нескольких GPU Unsloth старается разместить новую модель на GPU, который не занят другой моделью. «Если помещаются» оставляет около 1 ГБ свободным. «Если помещаются» и «Всегда» никогда не выгружают модель с другого GPU.",+ multiModelHint: "Относится к моделям чата, речи, изображений и видео. Каждая загруженная модель чата отвечает на запросы, в которых она указана. При нескольких GPU Unsloth старается разместить новую модель на GPU, который не занят другой моделью. «Если помещаются» оставляет около 1 ГБ свободным. «Если помещаются» и «Всегда» никогда не выгружают модель с другого GPU.",mediaIdleUnloadDescription:"Освобождать VRAM, выгружая модели изображений и видео после указанного числа секунд простоя. 0 оставляет их загруженными; минимальное значение: 60.",mlockVetoed: "--mlock остаётся выключенным: закрепление модели зарезервировало бы ОЗУ под неё целиком. Автовыгрузка по простою по-прежнему отключена.",@@ -2388,7 +2391,7 @@ export const ru = {modelMemoryKeywords:"mlock memlock ulimit vram gpu память озу резидентный закрепить блокировать держать загружен выгрузка простой mmap no-mmap load-mode подкачка",multiModelKeywords:- "несколько моделей вместе одновременно переключение помещаются выгрузка вытеснение vram gpu изображения видео чат всегда простой",+ "несколько моделей вместе одновременно переключение помещаются выгрузка вытеснение vram gpu изображения видео чат всегда простой речь голос озвучка озвучивание tts",mediaIdleUnloadKeywords:"изображения видео диффузия простой выгрузка ttl таймаут секунды освободить vram gpu память",},diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex 379d18f68e5..c3f06c17fbe 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -1760,10 +1760,9 @@ export const sv = {autoDescription: "Läs upp varje svar så snart det är klart",engineLabel: "TTS-motor",engineSystemDescription: "Inbyggda enhetsröster",- engineStudioDescription:- "Använder talmodellen som är inläst i Ljud",+ engineStudioDescription: "Talar med en modell som är inläst i Ljud › Text till tal",engineSystem: "Systemröster",- engineStudio: "Läs in TTS-modell",+ engineStudio: "Unsloth-modell",engineCustom: "Anpassad slutpunkt",engineCustomDescription:"En OpenAI-kompatibel TTS-server från dina anslutningar (t.ex. Kokoro)",@@ -1775,8 +1774,11 @@ export const sv = {customVoiceDescription:"Röstnamnet som slutpunkten förväntar sig; alloy är standard",modelLabel: "TTS-modell",- modelDescription:- "Läs in en talmodell i Ljud. Den ersätter chattmodellen.",+ modelDescription: "Ingen inläst. Läs in en i Ljud › Text till tal.",+ modelLoaded: "{model} är inläst",+ keepBothLabel: "Behåll chattmodellen inläst",+ keepBothDescription: "”Behåll flera modeller inlästa” är satt till ”Av”, så när en talmodell läses in avlastas chattmodellen.",+ keepBothAction: "Behåll båda inlästa",openAudioAction: "Öppna Ljud",voiceLabel: "Röst",voiceDescription: "Bästa rösterna på denna enhet",@@ -2542,13 +2544,13 @@ export const sv = {multiModelFit: "När de får plats",multiModelAlways: "Alltid",multiModelDescription:- "När en chatt-, bild- eller videomodell läses in avlastas de andra.",+ "När en chatt-, tal-, bild- eller videomodell läses in avlastas de andra.",multiModelDescriptionFit:"När en modell läses in behålls de andra om de får plats. Annars avlastas först de som inte används, sedan den aktiva.",multiModelDescriptionAlways:"När en modell läses in avlastas aldrig en annan. En modell som inte får plats läses inte in. Avlastning efter inaktivitet och träning frigör fortfarande minne.",multiModelHint:- "Gäller chatt-, bild- och videomodeller. Varje inläst chattmodell besvarar de förfrågningar som anger den. Med flera GPU:er försöker Unsloth placera en ny modell på en GPU som ingen annan modell använder. ”När de får plats” lämnar ungefär 1 GB ledigt. ”När de får plats” och ”Alltid” avlastar aldrig en modell på en annan GPU.",+ "Gäller chatt-, tal-, bild- och videomodeller. Varje inläst chattmodell besvarar de förfrågningar som anger den. Med flera GPU:er försöker Unsloth placera en ny modell på en GPU som ingen annan modell använder. ”När de får plats” lämnar ungefär 1 GB ledigt. ”När de får plats” och ”Alltid” avlastar aldrig en modell på en annan GPU.",mediaIdleUnloadDescription:"Frigör VRAM genom att avlasta bild- och videomodeller efter så många inaktiva sekunder. 0 behåller dem inlästa; minst 60.",mlockVetoed:@@ -2564,7 +2566,7 @@ export const sv = {modelMemoryKeywords:"mlock memlock ulimit vram gpu minne ram minnesresident fäst sida lås låst behåll inläst avlasta inaktiv mmap no-mmap inläsningsläge växling sidväxling mlock memlock ulimit vram gpu memory ram resident residency pin pinned page lock locked keep loaded unload idle mmap no-mmap load-mode swap paging",multiModelKeywords:- "flera modeller samtidigt tillsammans växla plats avlasta vram gpu bild video chatt alltid inaktiv multiple several models together alongside swap fit unload evict image chat always idle",+ "flera modeller samtidigt tillsammans växla plats avlasta vram gpu bild video chatt alltid inaktiv multiple several models together alongside swap fit unload evict image chat always idle tal röst tts läs upp högt",mediaIdleUnloadKeywords:"bild video diffusion inaktiv avlasta ttl tidsgräns sekunder frigör vram gpu minne image idle unload timeout seconds free memory",},diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 86bbfb3da1a..1da65b39a25 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -1602,9 +1602,9 @@ export const zhCN = {autoDescription: "每条回复完成后立即朗读",engineLabel: "TTS 引擎",engineSystemDescription: "设备内置语音",- engineStudioDescription: "使用在音频中加载的语音模型",+ engineStudioDescription: "使用在音频 › 文字转语音中加载的模型朗读",engineSystem: "系统语音",- engineStudio: "加载 TTS 模型",+ engineStudio: "Unsloth 模型",engineCustom: "自定义端点",engineCustomDescription:"来自连接的 OpenAI 兼容 TTS 服务器(例如 Kokoro)",@@ -1614,7 +1614,11 @@ export const zhCN = {customModelLabel: "模型",customVoiceDescription: "端点所需的语音名称(默认为 alloy)",modelLabel: "TTS 模型",- modelDescription: "在音频中加载语音模型。它会替换聊天模型。",+ modelDescription: "尚未加载。请在音频 › 文字转语音中加载一个。",+ modelLoaded: "已加载 {model}",+ keepBothLabel: "保持聊天模型加载",+ keepBothDescription: "“保持多个模型加载”已设为“关闭”,因此加载语音模型会卸载聊天模型。",+ keepBothAction: "两者都保持加载",openAudioAction: "打开音频",voiceLabel: "音色",voiceDescription: "此设备上效果最好的音色",@@ -2328,12 +2332,12 @@ export const zhCN = {multiModelOff: "关闭",multiModelFit: "能容纳时",multiModelAlways: "总是",- multiModelDescription: "加载聊天、图像或视频模型时,会卸载其他模型。",+ multiModelDescription: "加载聊天、语音、图像或视频模型时,会卸载其他模型。",multiModelDescriptionFit:"加载模型时,如果能容纳就保留其他模型。无法容纳时,先卸载未在使用的模型,再卸载当前模型。",multiModelDescriptionAlways:"加载模型时绝不卸载其他模型。无法容纳的模型不会被加载。空闲自动卸载和训练仍会释放内存。",- multiModelHint: "适用于聊天、图像和视频模型。每个已加载的聊天模型都会响应指定它的请求。在多 GPU 机器上,Unsloth 会尽量把新模型放到没有其他模型使用的 GPU 上。“能容纳时”会预留约 1 GB 空间。“能容纳时”和“总是”都不会卸载其他 GPU 上的模型。",+ multiModelHint: "适用于聊天、语音、图像和视频模型。每个已加载的聊天模型都会响应指定它的请求。在多 GPU 机器上,Unsloth 会尽量把新模型放到没有其他模型使用的 GPU 上。“能容纳时”会预留约 1 GB 空间。“能容纳时”和“总是”都不会卸载其他 GPU 上的模型。",mediaIdleUnloadDescription:"空闲达到该秒数后卸载图像和视频模型以释放 VRAM。设为 0 则保持加载,最小值为 60 秒。",mlockVetoed: "--mlock 保持关闭:锁定模型会为其全部内容预留内存。空闲自动卸载仍处于禁用状态。",@@ -2345,7 +2349,7 @@ export const zhCN = {// Not rendered: extra terms the settings search matches these rows on.modelMemoryKeywords:"mlock memlock ulimit vram gpu 内存 显存 常驻 固定 锁定 保持 已加载 卸载 空闲 mmap no-mmap load-mode 交换 分页",- multiModelKeywords: "多个 模型 同时 一起 切换 容纳 卸载 驱逐 vram gpu 图像 视频 聊天 总是 空闲",+ multiModelKeywords: "多个 模型 同时 一起 切换 容纳 卸载 驱逐 vram gpu 图像 视频 聊天 总是 空闲 语音 朗读 tts",mediaIdleUnloadKeywords: "图像 视频 扩散 空闲 卸载 ttl 超时 秒 释放 vram gpu 内存 显存",},storage: {diff --git a/studio/frontend/tests/audio-model-eject.test.ts b/studio/frontend/tests/audio-model-eject.test.tsindex b11371f1c0d..fc66eeccede 100644--- a/studio/frontend/tests/audio-model-eject.test.ts+++ b/studio/frontend/tests/audio-model-eject.test.ts@@ -26,7 +26,7 @@ test("Audio exposes the shared picker eject action only while idle", () => {test("Speak eject unloads the live main model and cancels stale auto-load", () => {assert.match(source,- /const activeModel = status\?\.active_model;[\s\S]*unloadModel\(\{\s*model_path: activeModel,\s*force_cancel_active: stopDecision\.forceCancelActive,\s*\}\)/,+ /const activeModel = status\?\.active_model;[\s\S]*unloadModel\(\{\s*model_path: (?:slotModel \?\? )?activeModel,\s*force_cancel_active: stopDecision\.forceCancelActive,\s*\}\)/,);assert.match(source,@@ -39,7 +39,7 @@ test("Speak eject asks about running chats before tearing anything down", () =>// Unforced, the backend refused with a 409 the page could only print as a toast.assert.match(source,- /const activeModel = status\?\.active_model;[\s\S]*confirmStopRunningChatsIfNeeded\(\s*"Unloading the model",\s*"unload",\s*\)/,+ /const activeModel = status\?\.active_model;[\s\S]*confirmStopRunningChatsIfNeeded\(\s*"Unloading the model",\s*"unload",?\s*\)/,);// Declining leaves the page as it was: the staged download dies only past the check.assert.match(@@ -49,14 +49,19 @@ test("Speak eject asks about running chats before tearing anything down", () =>// Queues would otherwise start a fresh run on the model this eject removes.assert.match(source,- /cancelPreStreamRunReservations\(stopDecision\.preStreamRunTokens\);\s*requestLocalPromptQueueStop\(stopDecision\.promptQueueThreadIds\);\s*await unloadModel/,+ /if \(!slotEject\) \{\s*cancelPreStreamRunReservations\(stopDecision\.preStreamRunTokens\);\s*requestLocalPromptQueueStop\(stopDecision\.promptQueueThreadIds\);\s*\}\s*await unloadModel/,);});test("a Speak load asks the same question and forces from the answer", () => {assert.match(source,- /const stopDecision = await confirmStopRunningChatsIfNeeded\(\);/,+ /const stopDecision = keepsChat\s*\? \{[\s\S]*?\}\s*: await confirmStopRunningChatsIfNeeded\(\);/,+ );+ // Only a load kept beside the chat model skips the question: its chats keep running.+ assert.match(+ source,+ /const keepsChat = useChatRuntimeStore\.getState\(\)\.keepModelsLoaded;/,);// The slot is claimed before the await, so a routed pick arriving mid-dialog queues.assert.match(@@ -81,7 +86,7 @@ test("a Speak load stops local queues only once /load is going out", () => {// happened, leaving the old model resident and the work gone.assert.match(source,- /onRequestStart: \(\) => \{\s*pending\.requestStarted = true;[\s\S]{0,700}?cancelPreStreamRunReservations\(stopDecision\.preStreamRunTokens\);\s*requestLocalPromptQueueStop\(stopDecision\.promptQueueThreadIds\);\s*\},/,+ /onRequestStart: \(\) => \{\s*pending\.requestStarted = true;[\s\S]{0,700}?cancelPreStreamRunReservations\(stopDecision\.preStreamRunTokens\);\s*requestLocalPromptQueueStop\(stopDecision\.promptQueueThreadIds\);\s*\}\s*\},/,);assert.doesNotMatch(source,@@ -95,7 +100,7 @@ test("a model swap holds Chat's lifecycle gate across the question", () => {// work nobody confirmed stopping, and a load started in that window 409s again.assert.match(source,- /ttsLoadInFlight\.current = true;[\s\S]{0,400}?const lifecycleLease = useChatRuntimeStore\.getState\(\)\.beginModelLoading\(\);\s*if \(lifecycleLease === null\) \{[\s\S]*?return;\s*\}[\s\S]{0,200}?const stopDecision = await confirmStopRunningChatsIfNeeded\(\);/,+ /ttsLoadInFlight\.current = true;[\s\S]{0,400}?const lifecycleLease = useChatRuntimeStore\.getState\(\)\.beginModelLoading\(\);\s*if \(lifecycleLease === null\) \{[\s\S]*?return;\s*\}[\s\S]{0,500}?const stopDecision = keepsChat[\s\S]{0,300}?: await confirmStopRunningChatsIfNeeded\(\);/,);// Released before the queued replay, which needs the gate for its own attempt.assert.match(@@ -105,7 +110,7 @@ test("a model swap holds Chat's lifecycle gate across the question", () => {// Eject takes it before it goes busy, so it is held across its own question too.assert.match(source,- /const lifecycleLease = useChatRuntimeStore\.getState\(\)\.beginModelLoading\(\);[\s\S]{0,300}?setBusy\("unloading"\);[\s\S]{0,400}?confirmStopRunningChatsIfNeeded\(\s*"Unloading the model",/,+ /const lifecycleLease = useChatRuntimeStore\.getState\(\)\.beginModelLoading\(\);[\s\S]{0,300}?setBusy\("unloading"\);[\s\S]{0,800}?confirmStopRunningChatsIfNeeded\(\s*"Unloading the model",/,);assert.match(source,diff --git a/studio/frontend/tests/audio-page-policy.test.ts b/studio/frontend/tests/audio-page-policy.test.tsindex 8775d6d359d..c4e191839ba 100644--- a/studio/frontend/tests/audio-page-policy.test.ts+++ b/studio/frontend/tests/audio-page-policy.test.ts@@ -11,7 +11,9 @@ import {MINIMAX_MUSIC_MAX_SECONDS,audioEjectAvailable,audioGenerationPresentation,+ audioModelToReplace,canTransitionAudioMode,+ describeAudioSlot,exactGgufLoadSelector,expectedGgufDownloadBytes,fetchGalleryWindow,@@ -1222,3 +1224,130 @@ test("reconcile keeps the same repo id when only the resident engine changed", (repo,);});++// The Audio page with a speech model loaded beside the chat model: it shows, generates with and+// ejects the speech model, never the chat model.+const chatPrimary = {+ active_model: "unsloth/Qwen3-1.7B-GGUF",+ model_identifier: "unsloth/Qwen3-1.7B-GGUF",+ gguf_variant: "UD-Q4_K_XL",+ is_audio: false,+ loading: [],+ loaded: ["unsloth/Qwen3-1.7B-GGUF"],+ serving: ["unsloth/Qwen3-1.7B-GGUF", "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF"],+ serving_checkpoints: ["unsloth/Qwen3-1.7B-GGUF", ""],+} as unknown as import("../src/features/chat/types/api.ts").InferenceStatusResponse;+const kokoroSlot = {+ ...chatPrimary,+ active_model: "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF",+ model_identifier: "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF",+ is_audio: true,+ audio_type: "audiocpp_tts",+};++test("the Audio page finds its speech model beside the chat model", async () => {+ const probed: string[] = [];+ const view = await describeAudioSlot(chatPrimary, async (id) => {+ probed.push(id);+ return kokoroSlot;+ });+ assert.deepEqual(probed, ["audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF"]);+ assert.equal(view.status.active_model, "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF");+ assert.equal(view.slotModel, "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF");+});++test("a primary speech model is used as is, without probing", async () => {+ const view = await describeAudioSlot(kokoroSlot, async () => {+ throw new Error("must not probe");+ });+ assert.equal(view.status, kokoroSlot);+ assert.equal(view.slotModel, null);+});++test("with only the chat model loaded, the Audio page shows no model to eject", async () => {+ // An id not in a slot answers with the primary; a failed probe counts as nothing.+ for (const probe of [async () => chatPrimary, async () => Promise.reject(new Error("x"))]) {+ const view = await describeAudioSlot(chatPrimary, probe);+ assert.equal(view.status.active_model, null);+ assert.equal(view.status.is_audio, false);+ assert.equal(view.status.gguf_variant, null);+ assert.equal(view.slotModel, null);+ // The rest of the status (memory mode, serving list) stays.+ assert.deepEqual(view.status.serving, chatPrimary.serving);+ }+});++test("a new speech load replaces only another speech model", () => {+ assert.equal(audioModelToReplace(kokoroSlot, "pocket"), kokoroSlot.active_model);+ assert.equal(audioModelToReplace(kokoroSlot, kokoroSlot.active_model as string), null);+ assert.equal(audioModelToReplace(chatPrimary, "pocket"), null);+ assert.equal(audioModelToReplace(null, "pocket"), null);+});++test("a speech model kept after the chat model was ejected is still found", async () => {+ // A kept model is never promoted, so the primary is empty and only the slot serves.+ const emptyPrimary = {+ ...chatPrimary,+ active_model: null,+ model_identifier: null,+ gguf_variant: null,+ loaded: [],+ serving: ["audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF"],+ serving_checkpoints: [""],+ };+ const probed: string[] = [];+ const view = await describeAudioSlot(emptyPrimary, async (id) => {+ probed.push(id);+ return kokoroSlot;+ });+ assert.deepEqual(probed, ["audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF"]);+ assert.equal(view.slotModel, "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF");+ assert.equal(audioModelToReplace(view.status, "pocket"), kokoroSlot.active_model);+});++test("a kept local speech model is routed by its path, not its short name", async () => {+ // The status names a custom-folder GGUF by its file stem; serving_checkpoints has the path.+ const primary = {+ ...chatPrimary,+ serving: ["unsloth/Qwen3-1.7B-GGUF", "MyVoice"],+ serving_checkpoints: ["unsloth/Qwen3-1.7B-GGUF", "/models/custom/MyVoice.gguf"],+ };+ const view = await describeAudioSlot(primary, async () => ({+ ...kokoroSlot,+ active_model: "MyVoice",+ }));+ assert.equal(view.slotModel, "/models/custom/MyVoice.gguf");+ assert.equal(view.slotLabel, "MyVoice");+ assert.equal(view.status.active_model, "MyVoice");+});++test("a local speech model is replaced by its path, not its short name", () => {+ // Loaded first with the chat model kept beside it, it is the active model: its status shows the+ // file stem and model_identifier holds the path the unload needs.+ const local = {+ ...kokoroSlot,+ active_model: "MyVoice",+ model_identifier: "/models/custom/MyVoice.gguf",+ };+ assert.equal(audioModelToReplace(local, "pocket"), "/models/custom/MyVoice.gguf");+ assert.equal(audioModelToReplace(local, "/models/custom/MyVoice.gguf"), null);+ assert.equal(audioModelToReplace(local, "MyVoice"), null);+});++test("a kept speech model sharing the chat model's short name is still found", async () => {+ // Two local GGUFs with one file stem: the server keeps them apart by checkpoint.+ const primary = {+ ...chatPrimary,+ active_model: "Voice",+ model_identifier: "/models/chat/Voice.gguf",+ serving: ["Voice", "Voice"],+ serving_checkpoints: ["/models/chat/Voice.gguf", "/models/tts/Voice.gguf"],+ };+ const probed: string[] = [];+ const view = await describeAudioSlot(primary, async (id) => {+ probed.push(id);+ return { ...kokoroSlot, active_model: "Voice", model_identifier: id };+ });+ assert.deepEqual(probed, ["/models/tts/Voice.gguf"]);+ assert.equal(view.slotModel, "/models/tts/Voice.gguf");+});diff --git a/studio/frontend/tests/audio-run-api.test.ts b/studio/frontend/tests/audio-run-api.test.tsindex 932d623bc62..9edebe39f7c 100644--- a/studio/frontend/tests/audio-run-api.test.ts+++ b/studio/frontend/tests/audio-run-api.test.ts@@ -219,7 +219,11 @@ test("a saved voice is made from an upload or a clip, within the limits", () =>});test("api.ts sends run and voice bodies only through the builders", () => {- assert.match(api, /body: JSON\.stringify\(buildAudioRunBody\(request\)\)/);+ // Named for a speech model kept beside the chat model, which would otherwise get the request.+ assert.match(+ api,+ /body: JSON\.stringify\(withAudioSlotModel\(buildAudioRunBody\(request\)\)\)/,+ );assert.match(api, /body: JSON\.stringify\(buildVoiceCreateBody\(request\)\)/);assert.match(api, /"\/api\/inference\/audio\/run"/);assert.match(api, /xhr\.send\(blob\)/);diff --git a/studio/frontend/tests/openai-model-catalog.test.ts b/studio/frontend/tests/openai-model-catalog.test.tsindex 1dc60fb78a4..a0d511d2fae 100644--- a/studio/frontend/tests/openai-model-catalog.test.ts+++ b/studio/frontend/tests/openai-model-catalog.test.ts@@ -7,6 +7,7 @@ import test, { mock } from "node:test";import {audioModelsFromCatalog,chatModelsFromCatalog,+ loadedSpeechModelId,watchAudioModels,} from "../src/features/settings/api/openai-model-catalog.ts";@@ -169,3 +170,44 @@ test("the audio catalog is relisted until a model is resident, then more slowly"mock.timers.reset();}});++test("read aloud picks a loaded model that can speak text", () => {+ const speak = (id: string, loaded: boolean, workflows: string[]) => ({+ id,+ loaded,+ task: "text-to-speech" as const,+ workflows,+ });+ assert.equal(loadedSpeechModelId([]), null);+ // Music, convert-only, transcription and unloaded models cannot read a reply.+ assert.equal(+ loadedSpeechModelId([+ speak("music", true, ["music"]),+ speak("rvc", true, ["convert"]),+ speak("kokoro", false, ["speak"]),+ { id: "whisper", loaded: true, task: "automatic-speech-recognition" },+ ]),+ null,+ );+ const both = [+ speak("kokoro", true, ["speak"]),+ speak("pocket", true, ["speak", "clone"]),+ ];+ assert.equal(loadedSpeechModelId(both), "kokoro");+ // A saved voice needs a model that can clone, when one is loaded.+ assert.equal(loadedSpeechModelId(both, true), "pocket");+ assert.equal(loadedSpeechModelId([both[0]], true), "kokoro");+});++test("a saved voice also counts a loaded clone-only model", () => {+ const cloneOnly = {+ id: "qwen3-tts-base",+ loaded: true,+ task: "text-to-speech" as const,+ workflows: ["clone"],+ };+ // The server runs a saved voice as a clone, so a clone-only model can read it.+ assert.equal(loadedSpeechModelId([cloneOnly], true), "qwen3-tts-base");+ // Without a saved voice it cannot speak plain text.+ assert.equal(loadedSpeechModelId([cloneOnly], false), null);+});diff --git a/studio/frontend/tests/read-aloud-beside-chat.test.ts b/studio/frontend/tests/read-aloud-beside-chat.test.tsnew file mode 100644index 00000000000..cbb375638a0--- /dev/null+++ b/studio/frontend/tests/read-aloud-beside-chat.test.ts@@ -0,0 +1,179 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// Read aloud with an Unsloth speech model while chatting: the speech model and the chat+// model stay loaded together when Keep multiple models loaded allows it, and the settings say so.++import assert from "node:assert/strict";+import { readdirSync } from "node:fs";+import test from "node:test";++import { readSrc } from "./helpers/kit.ts";++const slotHook = readSrc("features/audio/hooks/use-audio-model-slot.ts");+const chatAdapter = readSrc("features/chat/api/chat-adapter.ts");+const chatApi = readSrc("features/chat/api/chat-api.ts");+const audioPage = readSrc("features/audio/audio-page.tsx");+const audioApi = readSrc("features/audio/api.ts");+const chatRuntime = readSrc("features/chat/hooks/use-chat-model-runtime.ts");+const voiceTab = readSrc("features/settings/tabs/voice-tab.tsx");+const en = readSrc("i18n/locales/en.ts");++test("a speech load from Audio keeps the chat model loaded", () => {+ // Without it, When they fit replaced the chat model and Always refused the load.+ assert.match(+ slotHook,+ /const res = await loadModel\([\s\S]*?alongside: true,[\s\S]*?runtime: "tts",/,+ );+ // The speech model it replaces is unloaded just before /load goes out: as a third model, Always+ // refuses a load that fits only in its place, and a load cancelled earlier keeps it.+ assert.match(+ slotHook,+ /audioModelToReplace\(statusRef\.current, loadId \|\| repoId\)[\s\S]*?const replacePrevious = previous\s*\? \(\) =>\s*unloadModel\(\{\s*model_path: audioSlotRoutingId\(previous\) \?\? previous,\s*\}\)[\s\S]*?const res = await loadModel\([\s\S]*?beforeRequest: replacePrevious,/,+ );+ assert.doesNotMatch(slotHook, /await unloadModel\(\{\s*model_path: audioSlotRoutingId\(previous\)/);+ // A refused unload stops the switch: swallowed, the busy old model kept answering Read aloud.+ assert.match(+ slotHook,+ /const replacePrevious = previous\s*\? \(\) =>\s*unloadModel\(\{\s*model_path: audioSlotRoutingId\(previous\) \?\? previous,\s*\}\)\s*: undefined;/,+ );+ assert.match(+ chatApi,+ /if \(!preparedToken\.proceed\)[\s\S]*?if \(options\?\.signal\?\.aborted\)[\s\S]*?await options\?\.beforeRequest\?\.\(\);\s*options\?\.onRequestStart\?\.\(\);/,+ );+ // Kept beside the chat model, the load leaves running chats alone, as Chat's keep-others load does.+ assert.match(+ slotHook,+ /const keepsChat = useChatRuntimeStore\.getState\(\)\.keepModelsLoaded;\s*const stopDecision = keepsChat\s*\? \{\s*proceed: true,\s*forceCancelActive: false,/,+ );+ // Its queue stops run only when the load can replace the chat model.+ assert.match(+ slotHook,+ /if \(!keepsChat\) \{\s*cancelPreStreamRunReservations\(stopDecision\.preStreamRunTokens\);\s*requestLocalPromptQueueStop\(stopDecision\.promptQueueThreadIds\);\s*\}/,+ );+ // Ejecting a speech model with the chat model kept beside it (in a slot, or active with the chat+ // model in a slot) asks nothing, stops no queue and unloads it by its routing id.+ assert.match(+ slotHook,+ /const slotModel = audioSlotRoutingId\(activeModel\);\s*const slotEject =\s*slotModel !== null \|\| \(statusRef\.current\?\.serving\?\.length \?\? 0\) > 1;/,+ );+ assert.match(+ slotHook,+ /if \(!slotEject\) \{\s*cancelPreStreamRunReservations\(stopDecision\.preStreamRunTokens\);\s*requestLocalPromptQueueStop\(stopDecision\.promptQueueThreadIds\);\s*\}\s*await unloadModel\(\{\s*model_path: slotModel \?\? activeModel,[\s\S]*?if \(!slotEject\) requestLocalPromptQueueStop\(\);/,+ );+ // What the load unloaded is shown, and the other pages hear about it.+ assert.match(slotHook, /const evicted = evictedSlotsFrom\(res\);/);+ assert.match(slotHook, /resyncEvicted\(evicted, "audio"\);/);+});++test("under Off, the speech load says it unloads the chat model and offers to keep both", () => {+ assert.match(+ slotHook,+ /const replacesChat =\s*!useChatRuntimeStore\.getState\(\)\.keepModelsLoaded &&/,+ );+ assert.match(+ slotHook,+ /"Keep multiple models loaded is Off, so this unloads the chat model\."/,+ );+ assert.match(+ slotHook,+ // Owner only: a managed account cannot save the installation's mode.+ /action:\s*replacesChat && isAccountOwner\(\)\s*\? \{ label: "Keep both loaded", onClick: \(\) => void keepBothLoaded\(\) \}/,+ );+ assert.match(slotHook, /updateMultiModelMode\(\s*"fit",/);+});++test("the chat model's automatic loads keep the speech model loaded", () => {+ const loads =+ chatAdapter.match(+ /const loadResp = await loadModel\(\{[\s\S]*?\n\s*\}\)/g,+ ) ?? [];+ assert.equal(loads.length, 2);+ for (const load of loads) assert.match(load, /alongside: true,/);+ // Silent before: say what they unloaded to make room.+ assert.equal(chatAdapter.match(/reportEvicted\(loadResp\);/g)?.length, 2);+ assert.match(+ chatAdapter,+ /toastEvicted\(slots\);\s*resyncEvicted\(slots, "chat"\);/,+ );+});++test("Keep multiple models loaded is read from every status, not only after Settings", () => {+ assert.match(+ chatRuntime,+ /syncKeepModelsLoaded\(statusRes\.multi_model_mode\);/,+ );+ assert.match(audioPage, /syncKeepModelsLoaded\(next\.multi_model_mode\);/);+});++test("the Audio page shows and runs its own speech model, not the chat model", () => {+ assert.match(+ audioPage,+ /const view = await describeAudioSlot\(next, \(model\) =>\s*getInferenceStatus\(undefined, model\),?\s*\);[\s\S]*?setAudioSlotModel\(view\.slotModel, view\.slotLabel\);\s*setStatus\(view\.status\);/,+ );+ // Requests that name no model reach the active one, which is the chat model here.+ assert.match(+ audioApi,+ /return audioSlotModel \? \{ \.\.\.body, model: audioSlotModel \} : body;/,+ );+ assert.match(+ audioApi,+ /withAudioSlotModel\(\{\s*messages: \[\{ role: "user", content: text \}\],/,+ );+ assert.match(+ audioApi,+ /JSON\.stringify\(withAudioSlotModel\(buildAudioRunBody\(request\)\)\)/,+ );+});++test("Settings shows the loaded speech model and, under Off, how to keep both", () => {+ assert.match(+ voiceTab,+ /loadedTtsModel\s*\? t\("settings\.voice\.readAloud\.modelLoaded", \{\s*model: audioModelLabel\(loadedTtsModel\),/,+ );+ assert.match(+ voiceTab,+ /\{multiModelMode === "off" && isOwner \? \(\s*<SettingsRow\s*label=\{t\("settings\.voice\.readAloud\.keepBothLabel"\)\}/,+ );+ assert.match(voiceTab, /await updateMultiModelMode\(\s*"fit",/);+ assert.match(en, /modelLoaded: "\{model\} is loaded",/);+ assert.match(en, /keepBothAction: "Keep both loaded",/);+});++test("read-aloud and memory copy is clear in every language", () => {+ // The engine is a choice, not an action, and the row no longer states the bug as policy.+ assert.match(en, /engineStudio: "Unsloth model",/);+ assert.match(+ en,+ /multiModelDescription: "Loading a chat, speech, image or video model unloads the other ones\.",/,+ );+ assert.match(+ en,+ /multiModelHint: "Covers chat, speech, image and video models\./,+ );+ const dir = new URL("../src/i18n/locales/", import.meta.url);+ for (const file of readdirSync(dir)) {+ const locale = readSrc(`i18n/locales/${file}`);+ assert.doesNotMatch(+ locale,+ /replaces the chat model|load one in Speak/i,+ file,+ );+ const readAloud = locale.slice(locale.indexOf("readAloud: {"));+ const block = readAloud.slice(0, readAloud.indexOf("\n },"));+ for (const key of [+ "modelLoaded",+ "keepBothLabel",+ "keepBothDescription",+ "keepBothAction",+ ]) {+ assert.match(block, new RegExp(`\\b${key}:`), `${file} ${key}`);+ }+ assert.match(block, /modelLoaded:[^\n]*\{model\}/, file);+ // "Unsloth", never "Studio" alone or "Unsloth Studio": Desktop shows these strings too+ // (tests/studio/test_tauri_branding_contract.py).+ const engine = block.match(/engineStudio: "([^"]*)"/)?.[1] ?? "";+ assert.match(engine, /Unsloth/, file);+ assert.doesNotMatch(engine, /Studio/, file);+ }+});diff --git a/studio/frontend/tests/read-aloud-studio-voice.test.ts b/studio/frontend/tests/read-aloud-studio-voice.test.tsindex 1b71ad8b427..b0b2982bf4e 100644--- a/studio/frontend/tests/read-aloud-studio-voice.test.ts+++ b/studio/frontend/tests/read-aloud-studio-voice.test.ts@@ -1,8 +1,9 @@// SPDX-License-Identifier: AGPL-3.0-only// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0-// Read aloud on the "Load TTS model" engine speaks in a saved Audio voice and keeps its clips-// out of Speak's history.+// Read aloud on the "Unsloth model" engine speaks with the loaded speech model (named, so+// one kept beside the chat model answers), in a saved Audio voice, and keeps its clips out of+// Speak's history.import assert from "node:assert/strict";import { readdirSync } from "node:fs";@@ -10,6 +11,8 @@ import test from "node:test";import { loadWithStubs } from "./helpers/module-stubs.ts";+import * as modelCatalog from "../src/features/settings/api/openai-model-catalog.ts";+import * as formatError from "../src/lib/format-fastapi-error.ts";import { readSrc } from "./helpers/kit.ts";type Adapter = {@@ -21,6 +24,9 @@ type Adapter = {type Reply = { status: number; body: unknown };+const KOKORO = "audio-cpp/audio.cpp-gguf/Kokoro-82M-GGUF";+const CLONER = "audio-cpp/audio.cpp-gguf/PocketTTS-GGUF";+// Not the real ceiling, so a copy of the number in the adapter fails the body check.const MAX_TOKENS = 1234;@@ -28,6 +34,8 @@ const MAX_TOKENS = 1234;function load(voiceId: string,reply: Reply = { status: 200, body: { audio: { data: "UklGRg==" } } },+ // GET /v1/models: the listing, or an Error for a failed request.+ models: unknown = { data: [] },) {const posted: Record<string, unknown>[] = [];const setVoiceIds: string[] = [];@@ -39,8 +47,12 @@ function load(),{"@/features/auth": {- authFetch: async (_input: string, init: { body: string }) => {- posted.push(JSON.parse(init.body));+ authFetch: async (input: string, init?: { body?: string }) => {+ if (input === "/v1/models") {+ if (models instanceof Error) throw models;+ return { ok: true, status: 200, json: async () => models };+ }+ posted.push(JSON.parse(init?.body ?? "{}"));return {ok: reply.status < 400,status: reply.status,@@ -48,6 +60,8 @@ function load(};},},+ "../../settings/api/openai-model-catalog": modelCatalog,+ "@/lib/format-fastapi-error": formatError,"../search-images/search-images": {stripSearchImageTokens: (text: string) => text,},@@ -168,8 +182,110 @@ test("no model loaded points at Audio instead of a model name", async () => {});await assert.rejects(adapter.generateStudioTtsAudio("hello"),- /^Error: No speech model is loaded\. Open Audio/,+ /^Error: No Unsloth speech model is loaded\. Open Audio › Text to Speech/,+ );+});++test("read aloud names the loaded speech model, so one beside the chat model answers", async () => {+ const { adapter, posted } = load("", undefined, {+ data: [+ { id: "unsloth/Qwen3-1.7B-GGUF", loaded: true, task: "text-generation" },+ {+ id: "music",+ loaded: true,+ task: "text-to-speech",+ audio_workflows: ["music"],+ },+ {+ id: "on-disk",+ loaded: false,+ task: "text-to-speech",+ audio_workflows: ["speak"],+ },+ {+ id: KOKORO,+ loaded: true,+ task: "text-to-speech",+ audio_workflows: ["speak"],+ },+ ],+ });+ await adapter.generateStudioTtsAudio("hello");+ assert.equal(posted[0].model, KOKORO);+});++test("a saved voice prefers a loaded model that can clone", async () => {+ const { adapter, posted } = load("8f2c", undefined, {+ data: [+ {+ id: KOKORO,+ loaded: true,+ task: "text-to-speech",+ audio_workflows: ["speak"],+ },+ {+ id: CLONER,+ loaded: true,+ task: "text-to-speech",+ audio_workflows: ["speak", "clone"],+ },+ ],+ });+ await adapter.generateStudioTtsAudio("hello");+ assert.equal(posted[0].model, CLONER);+ assert.equal(posted[0].voice_id, "8f2c");+});++test("no listing or no loaded speech model leaves the request on the active model", async () => {+ for (const models of [+ new Error("offline"),+ { data: [] },+ { detail: "nope" },+ ]) {+ const { adapter, posted } = load("", undefined, models);+ await adapter.generateStudioTtsAudio("hello");+ assert.equal("model" in posted[0], false);+ }+});++test("a named speech model that was unloaded says to load it again", async () => {+ // The server nests this refusal ({detail: {error: {message}}}); a plain string read showed+ // "[object Object]".+ const { adapter } = load(+ "",+ {+ status: 404,+ body: {+ detail: {+ error: {+ message: `The model '${KOKORO}' is downloaded but not loaded, and 'Switch model by request' is off.`,+ type: "invalid_request_error",+ },+ },+ },+ },+ {+ data: [+ {+ id: KOKORO,+ loaded: true,+ task: "text-to-speech",+ audio_workflows: ["speak"],+ },+ ],+ },+ );+ await assert.rejects(+ adapter.generateStudioTtsAudio("hello"),+ /^Error: The Unsloth speech model for read aloud is no longer loaded\. Load it again in Audio › Text to Speech/,+ );+});++test("read-aloud errors name the Text to Speech page, not Speak", () => {+ const source = readSrc(+ "features/chat/adapters/studio-speech-synthesis-adapter.ts",);+ assert.doesNotMatch(source, /load one in Speak|in Audio, or/);});test("the voice setting persists and Settings lists saved voices for the studio engine", () => {@@ -210,3 +326,18 @@ test("no read-aloud copy names a model the user may not have", () => {/Orpheus/,);});++test("a saved voice can read aloud with a loaded clone-only model", async () => {+ const { adapter, posted } = load("8f2c", undefined, {+ data: [+ {+ id: CLONER,+ loaded: true,+ task: "text-to-speech",+ audio_workflows: ["clone"],+ },+ ],+ });+ await adapter.generateStudioTtsAudio("hello");+ assert.equal(posted[0].model, CLONER);+});diff --git a/studio/frontend/tests/tts-custom-connections-disabled.test.ts b/studio/frontend/tests/tts-custom-connections-disabled.test.tsindex 61a57567797..dd78b60507b 100644--- a/studio/frontend/tests/tts-custom-connections-disabled.test.ts+++ b/studio/frontend/tests/tts-custom-connections-disabled.test.ts@@ -73,10 +73,14 @@ function load({"@/features/auth": {authFetch: async (- _input: string,+ input: string,init: { body: string },options?: { beforeRetry?: () => void },) => {+ // The Unsloth Studio engine first lists the loaded models; it is not a speech request.+ if (input === "/v1/models") {+ return { ok: true, json: async () => ({ data: [] }) };+ }if (beforeAuthenticatedRetry) {beforeAuthenticatedRetry();options?.beforeRetry?.();@@ -89,6 +93,12 @@ function load(};},},+ // The Unsloth Studio engine's model lookup.+ "@/lib/format-fastapi-error": { formatApiErrorBody: () => null },+ "../../settings/api/openai-model-catalog": {+ audioModelsFromCatalog: () => [],+ loadedSpeechModelId: () => null,+ },"../search-images/search-images": {stripSearchImageTokens: (text: string) => text,},@@ -172,7 +182,10 @@ test("read-aloud sends the speech text, not the markdown source (#12547)", asynctoSpeech: (text) => `spoken(${text})`,});new adapter.StudioSpeechSynthesisAdapter().speak("**Done.**");- await new Promise((resolve) => setTimeout(resolve, 0));+ // The model lookup adds a request before the speech one.+ for (let i = 0; i < 20 && posted.length === 0; i++) {+ await new Promise((resolve) => setTimeout(resolve, 0));+ }assert.equal(JSON.parse(posted[0]).messages[0].content, "spoken(**Done.**)");});diff --git a/tests/studio/test_chat_autoload_failure_gate.py b/tests/studio/test_chat_autoload_failure_gate.pyindex 3a7a99fe204..a826a6494d7 100644--- a/tests/studio/test_chat_autoload_failure_gate.py+++ b/tests/studio/test_chat_autoload_failure_gate.py@@ -396,6 +396,9 @@ function loadFallbackNotice(degraded: parts.length > 0,};}+// Defined beside chat-adapter.ts's imports, outside the sliced region: toasts and resyncs the models a+// load unloaded to make room, which no scenario here asserts on.+function reportEvicted(_loadResp: any) {}// From ../lib/partial-offload: the auto-load success toast reports a layer split through them.// Real semantics are tested in studio/frontend/tests/partial-offload.test.ts.function offloadCountsFrom(response: any) {diff --git a/tests/studio/test_chat_mount_cli_load_adoption.py b/tests/studio/test_chat_mount_cli_load_adoption.pyindex 424b2b0ee82..711491752a0 100644--- a/tests/studio/test_chat_mount_cli_load_adoption.py+++ b/tests/studio/test_chat_mount_cli_load_adoption.py@@ -127,6 +127,8 @@ export async function loadOpenAIAutoSwitchSettings(): Promise<any> {return { idleUnloadActive: false };}+// Follows Keep multiple models loaded from each status read; no scenario here sets a mode.+export function syncKeepModelsLoaded(_mode: unknown): void {}export const toChatModelRow = (model: any) => model;export const toLoraSummary = (lora: any) => lora;export const isExternalModelId = (id: unknown) =>