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: train on CPU when no GPU is found, and offer Install Training on GPU-less Chat only installs (#16175)
oobabooga1d1363fe0e43
diff --git a/studio/backend/core/training/worker.py b/studio/backend/core/training/worker.pyindex cd69301baf9..72a1b20a8cd 100644--- a/studio/backend/core/training/worker.py+++ b/studio/backend/core/training/worker.py@@ -4142,6 +4142,9 @@ def run_training_process(*, event_queue: Any, stop_queue: Any, config: dict) ->from utils.hardware import hardware as _hw_hw.detect_hardware()+ if _hw.trains_on_cpu(_hw.CHAT_ONLY_REASON):+ # Studio's verdict wins over the inherited UNSLOTH_DISABLE_CPU_FALLBACK=1 and zoo's own CPU refusals.+ os.environ["UNSLOTH_FORCE_CPU"] = "1"if mlx_backend_requested or should_use_mlx_training_backend(device = _hw.DEVICE):diffusion_error = _mlx_diffusion_lm_error(config, model_load_target)if diffusion_error:diff --git a/studio/backend/main.py b/studio/backend/main.pyindex 76aa457187e..b5f22b97141 100644--- a/studio/backend/main.py+++ b/studio/backend/main.py@@ -325,6 +325,7 @@ del _guard_dataset_mediaos.environ.setdefault("UNSLOTH_IS_PRESENT", "1")# Studio decides training / export / chat-only from its own hardware detection, so keep# `import unsloth` refusing on a GPU-less host here instead of loading the CPU training backend.+# A training worker on a host Studio trains on CPU opts back in (core/training/worker.py).os.environ.setdefault("UNSLOTH_DISABLE_CPU_FALLBACK", "1")# Must not import unsloth here (pulls torch/GPU); before transformers reads sentencepiece.@@ -2262,6 +2263,8 @@ async def health_check(request: Request):authed["video_cpu_opt_in"] = bool(video_cpu_enabled())except Exception:pass+ # chat_only stays set: chat stays GGUF-only and Export and Video keep their own verdicts.+ authed["cpu_training"] = bool(snapshot[0]) and _hw_module.trains_on_cpu(snapshot[1])# What specifically blocked that reason, when detection recorded one. Only the MLX gate does today, and only# because it is all-or-nothing: without it the greyed-out Train row can only say "run `unsloth studio# update`". From the snapshot, so it cannot come from a different detection pass than the reason beside it.diff --git a/studio/backend/routes/training.py b/studio/backend/routes/training.pyindex 308911993e5..0521934b7ff 100644--- a/studio/backend/routes/training.py+++ b/studio/backend/routes/training.py@@ -1317,6 +1317,27 @@ def _reject_untrainable_model_request(def _validate_training_platform(request: TrainingStartRequest) -> None:from utils.hardware import hardware+ if hardware.DEVICE == hardware.DeviceType.CPU and hardware.trains_on_cpu(+ hardware.current_chat_only_verdict()[0]+ ):+ # The CPU backend (unsloth/_cpu_init.py) trains text models with SFTTrainer only.+ if request.is_dataset_image or request.is_dataset_audio:+ unsupported = "Vision and audio training"+ elif request.is_embedding:+ unsupported = "Embedding model training"+ elif request.is_decision:+ unsupported = "Decision model training"+ elif request.drafter is not None and request.drafter.enabled:+ unsupported = "Drafter training"+ else:+ return+ raise HTTPException(+ status_code = 400,+ detail = (+ f"{unsupported} is not supported on CPU yet. No GPU was found, so this host "+ "trains text models only (LoRA or full finetuning)."+ ),+ )if hardware.DEVICE != hardware.DeviceType.MLX:returnif request.training_type == "Continued Pretraining":diff --git a/studio/backend/run.py b/studio/backend/run.pyindex 6c87dc779da..09ac5ad6af6 100644--- a/studio/backend/run.py+++ b/studio/backend/run.py@@ -1313,6 +1313,7 @@ if _STUDIO_ROOT_RESOLVED != _LEGACY_STUDIO_ROOT or _MASTER_ROOT is not None:os.environ.setdefault("UNSLOTH_IS_PRESENT", "1")# Studio decides training / export / chat-only from its own hardware detection, so keep# `import unsloth` refusing on a GPU-less host here instead of loading the CPU training backend.+# A training worker on a host Studio trains on CPU opts back in (core/training/worker.py).os.environ.setdefault("UNSLOTH_DISABLE_CPU_FALLBACK", "1")diff --git a/studio/backend/tests/test_chat_only_reason.py b/studio/backend/tests/test_chat_only_reason.pyindex b81c6b64232..690ebb78b7e 100644--- a/studio/backend/tests/test_chat_only_reason.py+++ b/studio/backend/tests/test_chat_only_reason.py@@ -28,11 +28,11 @@ def _no_torch(monkeypatch):monkeypatch.setattr(hw, "_NO_TORCH_SETTLED_EPOCH", None)monkeypatch.setattr(hw, "_CHAT_ONLY_HINT", None)# detect_hardware sets these globals directly; restore them so they do not leak.- saved = (hw.DEVICE, hw.CHAT_ONLY, hw.CHAT_ONLY_REASON, hw.IS_ROCM)+ saved = (hw.DEVICE, hw.CHAT_ONLY, hw.CHAT_ONLY_REASON, hw.IS_ROCM, hw._CPU_TRAINING_REASON)try:yieldfinally:- hw.DEVICE, hw.CHAT_ONLY, hw.CHAT_ONLY_REASON, hw.IS_ROCM = saved+ hw.DEVICE, hw.CHAT_ONLY, hw.CHAT_ONLY_REASON, hw.IS_ROCM, hw._CPU_TRAINING_REASON = saveddef test_apple_silicon_without_mlx_is_chat_only_with_reason(monkeypatch):@@ -112,23 +112,32 @@ def test_a_no_torch_install_off_mac_is_off_by_request_not_missing_a_gpu(monkeypaassert hw.CHAT_ONLY is Trueassert hw.CHAT_ONLY_REASON == "no_torch"assert hw.current_chat_only_verdict() == ("no_torch", None)+ assert hw.trains_on_cpu("no_torch") is False@pytest.mark.parametrize("devices", [[], [_INTEL_IGPU]], ids = ["no-gpu", "intel-igpu"])-def test_a_no_torch_install_without_a_trainable_gpu_stays_no_gpu(monkeypatch, devices):- # no_torch offers a multi-GB install that cannot enable Train here.+def test_a_no_torch_install_without_a_trainable_gpu_is_offered_cpu_training(monkeypatch, devices):+ # The full install trains here on the CPU backend, so the Desktop offers it; it still brings no export._no_torch_off_mac(monkeypatch, devices = devices)+ monkeypatch.setattr(hw, "get_device", lambda: hw.DeviceType.CPU)hw.detect_hardware()assert hw.CHAT_ONLY is True- assert hw.CHAT_ONLY_REASON == "no_gpu"- assert hw.current_chat_only_verdict() == ("no_gpu", None)+ assert hw.CHAT_ONLY_REASON == "no_torch"+ assert hw.current_chat_only_verdict() == ("no_torch", None)+ assert hw.trains_on_cpu("no_torch") is True+ export = hw.export_capability()+ assert export["export_unsupported_reason"] == "no_accelerator"+ assert "--no-torch" not in export["export_unsupported_message"]def test_a_no_torch_install_whose_inventory_cannot_answer_keeps_no_torch(monkeypatch):# A probe that timed out is not "no GPU"._no_torch_off_mac(monkeypatch, devices = [], unknown = True)+ monkeypatch.setattr(hw, "get_device", lambda: hw.DeviceType.CPU)hw.detect_hardware()assert hw.CHAT_ONLY_REASON == "no_torch"+ assert hw.trains_on_cpu("no_torch") is False+ assert hw.export_capability()["export_unsupported_reason"] == "no_torch"_AMD_CARD = {"vendor": "amd", "index": 0, "name": "AMD Radeon RX 7900 XTX", "gfx": "gfx1100"}@@ -175,6 +184,7 @@ def test_apple_silicon_no_torch_install_without_mlx_is_off_by_request(monkeypatcassert hw.CHAT_ONLY is Trueassert hw.CHAT_ONLY_REASON == "no_torch"assert hw.CHAT_ONLY_DETAIL is None+ assert hw.trains_on_cpu("no_torch") is False@pytest.mark.parametrize(@@ -352,6 +362,7 @@ def test_cpu_only_non_mac_reason(monkeypatch):hw.detect_hardware()assert hw.CHAT_ONLY is Trueassert hw.CHAT_ONLY_REASON == "no_gpu"+ assert hw.trains_on_cpu("no_gpu") is False@pytest.mark.parametrize("tegra, chosen", [(True, True), (False, False)])diff --git a/studio/backend/tests/test_cpu_training_host.py b/studio/backend/tests/test_cpu_training_host.pynew file mode 100644index 00000000000..7eca5d8eb48--- /dev/null+++ b/studio/backend/tests/test_cpu_training_host.py@@ -0,0 +1,203 @@+# SPDX-License-Identifier: AGPL-3.0-only+# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++"""A CPU-only host trains on the CPU backend: health says so, the start route refuses what that backend+cannot train, and the training worker commits to the verdict before anything imports unsloth."""++from __future__ import annotations++import importlib.util+import os+import sys+from pathlib import Path++import pytest+from fastapi import HTTPException++_BACKEND = Path(__file__).resolve().parent.parent+if str(_BACKEND) not in sys.path:+ sys.path.insert(0, str(_BACKEND))++import utils.hardware as hardware_pkg # noqa: E402+import utils.hardware.hardware as hw # noqa: E402+from models.training import DrafterTrainingConfig, TrainingStartRequest # noqa: E402+++def _restore_real_logging_modules() -> dict:+ """Drops the loggers/structlog stubs other test files install, since main needs the real packages."""+ removed = {}+ stub = sys.modules.get("loggers")+ if stub is not None and not hasattr(stub, "__path__"):+ for name in [n for n in sys.modules if n == "loggers" or n.startswith("loggers.")]:+ removed[name] = sys.modules.pop(name)+ stub = sys.modules.get("structlog")+ if stub is not None and not hasattr(stub, "BoundLogger"):+ removed["structlog"] = sys.modules.pop("structlog")+ try:+ import structlog # noqa: F401+ except Exception:+ sys.modules.update(removed)+ pytest.skip("real structlog is required to import main")+ return removed+++def _health(monkeypatch, *, reason, established) -> dict:+ """The authed /api/health body for a settled chat-only verdict."""+ swapped = _restore_real_logging_modules()+ import auth.authentication as authmod+ import main as main_mod+ from fastapi import FastAPI+ from fastapi.testclient import TestClient++ monkeypatch.setattr(hardware_pkg, "is_apple_silicon", lambda: False)+ monkeypatch.setattr(hw, "DEVICE", hw.DeviceType.CPU)+ monkeypatch.setattr(hw, "CHAT_ONLY", True)+ monkeypatch.setattr(hw, "CHAT_ONLY_REASON", reason)+ monkeypatch.setattr(hw, "CHAT_ONLY_DETAIL", None)+ monkeypatch.setattr(hw, "_CPU_TRAINING_REASON", established)+ monkeypatch.setattr(hw, "current_chat_only_verdict", lambda: (reason, None))+ monkeypatch.setattr(main_mod, "_torch_warm_in_progress", lambda: False)+ was_complete = hw.DETECTION_COMPLETE.is_set()+ hw.DETECTION_COMPLETE.set()++ async def _subject(_creds):+ return "tester"++ monkeypatch.setattr(authmod, "get_current_subject", _subject)+ app = FastAPI()+ app.add_api_route("/api/health", main_mod.health_check, methods = ["GET"])+ try:+ with TestClient(app) as client:+ return client.get("/api/health", headers = {"Authorization": "Bearer probe"}).json()+ finally:+ if not was_complete:+ hw.DETECTION_COMPLETE.clear()+ sys.modules.update(swapped)+++ "reason, established, expected",+ [+ ("no_gpu", "no_gpu", True),+ ("no_torch", "no_torch", True),+ ("no_gpu", None, False),+ ("torch_cpu_build", "no_gpu", False),+ ("torch_cuda_unavailable", "no_gpu", False),+ ("no_torch", None, False),+ ("detection_failed", "no_gpu", False),+ ("no_torch", "no_gpu", False),+ ],+)+def test_health_reports_cpu_training_only_beside_its_verdicts(+ monkeypatch, reason, established, expected+):+ body = _health(monkeypatch, reason = reason, established = established)+ assert body["chat_only"] is True+ assert body["chat_only_reason"] == reason+ assert body["cpu_training"] is expected+++def _route():+ spec = importlib.util.spec_from_file_location(+ "training_route_cpu_host", _BACKEND / "routes" / "training.py"+ )+ module = importlib.util.module_from_spec(spec)+ spec.loader.exec_module(module)+ return module+++def _request(**overrides) -> TrainingStartRequest:+ payload = {+ "model_name": "unsloth/test",+ "training_type": "LoRA/QLoRA",+ "format_type": "alpaca",+ "hf_dataset": "org/dataset",+ }+ payload.update(overrides)+ return TrainingStartRequest(**payload)+++def cpu_training_host(monkeypatch):+ monkeypatch.setattr(hw, "DEVICE", hw.DeviceType.CPU)+ monkeypatch.setattr(hw, "_CPU_TRAINING_REASON", "no_gpu")+ monkeypatch.setattr(hw, "current_chat_only_verdict", lambda: ("no_gpu", None))+++ "overrides, named",+ [+ (dict(is_dataset_image = True), "Vision and audio training"),+ (dict(is_dataset_audio = True), "Vision and audio training"),+ (dict(is_embedding = True), "Embedding model training"),+ (dict(is_decision = True), "Decision model training"),+ (dict(drafter = DrafterTrainingConfig(enabled = True)), "Drafter training"),+ ],+)+def test_the_start_route_refuses_what_the_cpu_backend_cannot_train(+ cpu_training_host, overrides, named+):+ with pytest.raises(HTTPException) as exc_info:+ _route()._validate_training_platform(_request(**overrides))+ assert exc_info.value.status_code == 400+ assert exc_info.value.detail.startswith(f"{named} is not supported on CPU yet.")+++ "training_type", ["LoRA/QLoRA", "Full Finetuning", "Continued Pretraining"]+)+def test_the_start_route_admits_text_training_on_cpu(cpu_training_host, training_type):+ _route()._validate_training_platform(_request(training_type = training_type))+++def test_a_gpu_host_is_not_held_to_the_cpu_limits(monkeypatch):+ monkeypatch.setattr(hw, "DEVICE", hw.DeviceType.CUDA)+ _route()._validate_training_platform(_request(is_embedding = True))+++def _run_worker_until_dispatch(monkeypatch, *, reason, established):+ """Runs run_training_process() up to its first backend dispatch and returns the environment it left."""+ from core.training import worker++ monkeypatch.delenv("UNSLOTH_FORCE_CPU", raising = False)+ monkeypatch.setattr(hw, "detect_hardware", lambda: hw.DeviceType.CPU)+ monkeypatch.setattr(hw, "DEVICE", hw.DeviceType.CPU)+ monkeypatch.setattr(hw, "CHAT_ONLY_REASON", reason)+ monkeypatch.setattr(hw, "_CPU_TRAINING_REASON", established)+ monkeypatch.setattr(worker, "_validate_training_worker_config", lambda *_a: True)+ monkeypatch.setattr(worker, "_escaping_weights_error", lambda _c: None)+ monkeypatch.setattr(worker, "apply_gpu_ids", lambda *_a, **_k: None)+ monkeypatch.setattr(worker, "_training_job_is_local", lambda _c: True)+ import core.training.training as training_mod++ monkeypatch.setattr(training_mod, "is_apple_silicon_training_platform", lambda: False)++ # The first step past the MLX dispatch; stopping there leaves only the environment to inspect.+ monkeypatch.setattr(+ worker,+ "_activate_transformers_version",+ lambda *_a: (_ for _ in ()).throw(RuntimeError("stop here")),+ )+ events = []+ worker.run_training_process(+ event_queue = _Queue(events), stop_queue = _Queue([]), config = {"model_name": "unsloth/test"}+ )+ assert [event["error"] for event in events] == [+ "Failed to activate transformers version: stop here"+ ]+ return os.environ.get("UNSLOTH_FORCE_CPU")+++class _Queue:+ def __init__(self, items):+ self.put = items.append+++def test_the_worker_trains_on_cpu_where_studio_enabled_train(monkeypatch):+ # The parent's UNSLOTH_DISABLE_CPU_FALLBACK=1 would make `import unsloth` refuse this host.+ assert _run_worker_until_dispatch(monkeypatch, reason = "no_gpu", established = "no_gpu") == "1"++[email protected]("reason, established", [("torch_cpu_build", "no_gpu"), ("no_gpu", None)])+def test_the_worker_leaves_every_other_host_alone(monkeypatch, reason, established):+ assert _run_worker_until_dispatch(monkeypatch, reason = reason, established = established) is Nonediff --git a/studio/backend/tests/test_torch_cpu_build_on_nvidia_host.py b/studio/backend/tests/test_torch_cpu_build_on_nvidia_host.pyindex 987bc619651..6bcd9560a43 100644--- a/studio/backend/tests/test_torch_cpu_build_on_nvidia_host.py+++ b/studio/backend/tests/test_torch_cpu_build_on_nvidia_host.py@@ -313,6 +313,7 @@ def _detect(monkeypatch):("CHAT_ONLY", True),("CHAT_ONLY_REASON", None),("CHAT_ONLY_DETAIL", None),+ ("_CPU_TRAINING_REASON", None),):monkeypatch.setattr(hw, name, value)with hw._DETECT_LOCK:@@ -327,6 +328,7 @@ def test_chat_only_stops_claiming_this_host_has_no_gpu(monkeypatch, cpu_torch_onassert hw.CHAT_ONLY_REASON == "torch_cpu_build"assert hw.CHAT_ONLY_REASON != "no_gpu"assert hw.CHAT_ONLY_DETAIL == "2.11.0+cpu"+ assert hw.trains_on_cpu(hw.CHAT_ONLY_REASON) is Falsedef test_a_host_that_really_has_no_gpu_still_reads_no_gpu(monkeypatch):@@ -343,6 +345,20 @@ def test_a_host_that_really_has_no_gpu_still_reads_no_gpu(monkeypatch):assert hw.CHAT_ONLY_REASON == "no_gpu"assert hw.CHAT_ONLY_DETAIL is Noneassert hw._torch_gpu_mismatch_report() == {}+ assert hw.CHAT_ONLY is True+ assert hw.trains_on_cpu(hw.CHAT_ONLY_REASON) is True+++def test_a_card_that_goes_away_leaves_a_cpu_training_host(monkeypatch, cpu_torch_on_an_nvidia_host):+ """The refreshed verdict drops a detached card's mismatch, and the host then trains on CPU (the+ worker re-detects); a card that comes back takes Train away again."""+ _detect(monkeypatch)+ assert hw.CHAT_ONLY_REASON == "torch_cpu_build"+ monkeypatch.setattr(hw, "get_physical_gpu_inventory", lambda **_kw: {"devices": []})+ hw.torch_build_snapshot()+ reason, _detail = hw.current_chat_only_verdict()+ assert reason == "no_gpu"+ assert hw.trains_on_cpu(reason) is Truedef test_a_healthy_cuda_host_reports_no_mismatch_at_all(monkeypatch):diff --git a/studio/backend/tests/test_training_streaming.py b/studio/backend/tests/test_training_streaming.pyindex 7187a4ff4d8..250a0d90426 100644--- a/studio/backend/tests/test_training_streaming.py+++ b/studio/backend/tests/test_training_streaming.py@@ -14,11 +14,18 @@ from fastapi import HTTPExceptionfrom pydantic import ValidationErrorfrom models.training import TrainingStartRequest+from utils.hardware import hardware as _hwfrom utils.datasets.chat_templates import apply_chat_template_to_datasetfrom utils.datasets.format_conversion import convert_chatml_to_alpacafrom utils.datasets.iterable import is_streaming_dataset[email protected](autouse = True)+def _pin_cuda_device(monkeypatch):+ # The start-route tests assume a GPU host; a GPU-less or Apple Silicon runner would hit a platform refusal first.+ monkeypatch.setattr(_hw, "DEVICE", _hw.DeviceType.CUDA)++def _shared_setup_1(request, training_route):backend = SimpleNamespace(current_job_id = None,diff --git a/studio/backend/utils/hardware/hardware.py b/studio/backend/utils/hardware/hardware.pyindex 19942dbcc9c..e190122271b 100644--- a/studio/backend/utils/hardware/hardware.py+++ b/studio/backend/utils/hardware/hardware.py@@ -48,12 +48,14 @@ class DeviceType(str, Enum):DEVICE: Optional[DeviceType] = NoneCHAT_ONLY: bool = True # No CUDA GPU -> GGUF chat only (Mac, CPU-only, etc.)-# Why CHAT_ONLY is True; None when training is enabled. "mlx_unavailable": Apple Silicon with a missing, too old or broken MLX stack, published at once when no mlx is on disk while a present but unusable one waits for the post-warm probe, so a stack that only lost the warm's import race is still overturned; "no_torch": installed --no-torch on Apple Silicon, or on a host whose GPU inventory shows a card a PyTorch GPU build could use, GGUF-only by request, which `unsloth studio update` cannot change; "rosetta": an x86_64 Python on Apple Silicon; "intel_mac"; "no_gpu": CPU-only non-Mac; "torch_cpu_build" / "torch_cuda_unavailable" (see classify_torch_build()): the host HAS GPUs this PyTorch cannot use, which must not read as "no_gpu", since the fix is repairing the install, not buying a GPU.+# Why CHAT_ONLY is True; None when training is enabled (on "no_gpu", trains_on_cpu() says whether Train runs on the CPU backend instead). "mlx_unavailable": Apple Silicon with a missing, too old or broken MLX stack, published at once when no mlx is on disk while a present but unusable one waits for the post-warm probe, so a stack that only lost the warm's import race is still overturned; "no_torch": installed --no-torch, GGUF-only by request, which `unsloth studio update` cannot change (off Mac the full install trains on the GPU, or on the CPU backend when there is none); "rosetta": an x86_64 Python on Apple Silicon; "intel_mac"; "no_gpu": CPU-only non-Mac, where Train runs on the CPU backend when PyTorch is installed; "torch_cpu_build" / "torch_cuda_unavailable" (see classify_torch_build()): the host HAS GPUs this PyTorch cannot use, which must not read as "no_gpu", since the fix is repairing the install, not buying a GPU.CHAT_ONLY_REASON: Optional[str] = None# What blocked the reason above, when there is something specific to say. Only "mlx_unavailable" sets it: the gate is all-or-nothing across mlx, mlx-lm and mlx-vlm, so naming the offending package is the difference between a dead end and a fix. Never shown on its own.CHAT_ONLY_DETAIL: Optional[str] = None# (reason, hint) from the last detection pass that found a torch mismatch._CHAT_ONLY_HINT: Optional[tuple[Optional[str], Optional[str]]] = None+# Verdict under which training runs on the CPU backend (unsloth/_cpu_init.py): "no_gpu" with PyTorch, "no_torch" with no card a GPU build could use, else None. Read via trains_on_cpu().+_CPU_TRAINING_REASON: Optional[str] = None# The vendors whose cards established the two mismatch reasons, empty otherwise: current_chat_only_verdict() freezes a mismatch while the inventory cannot answer, and without this a detached AMD eGPU stays "unusable" for as long as nvidia-smi is broken on a host that never had an NVIDIA card.CHAT_ONLY_MISMATCH_VENDORS: frozenset = frozenset()IS_ROCM: bool = False # True when running on AMD ROCm (HIP) -- routes GPU monitoring to amd.py@@ -100,12 +102,13 @@ def owning_detection_epoch(epoch: Optional[int]):def _discard_detection_locked() -> None:"""Drop a verdict produced for an epoch that has been retired."""global DEVICE, CHAT_ONLY, CHAT_ONLY_REASON, CHAT_ONLY_DETAIL, IS_ROCM- global CHAT_ONLY_MISMATCH_VENDORS+ global CHAT_ONLY_MISMATCH_VENDORS, _CPU_TRAINING_REASONDEVICE = NoneCHAT_ONLY = TrueCHAT_ONLY_REASON = NoneCHAT_ONLY_DETAIL = NoneCHAT_ONLY_MISMATCH_VENDORS = frozenset()+ _CPU_TRAINING_REASON = NoneIS_ROCM = FalseDETECTION_COMPLETE.clear()@@ -1555,11 +1558,19 @@ def _print_cuda_device_list(is_rocm: bool) -> None:def detect_hardware() -> DeviceType:"""Detect the best compute device and set the module-level DEVICE global; call once at FastAPI lifespan startup, idempotent. Order: XPU only on an unambiguous "prefer XPU" signal (CUDA hidden or unavailable, or UNSLOTH_FORCE_XPU=1) AND a non-empty ZE_AFFINITY_MASK AND torch.xpu reporting a device, since a stray inherited mask must not beat CUDA on hybrid hosts; then CUDA, XPU, MLX, CPU."""global DEVICE, CHAT_ONLY, CHAT_ONLY_REASON, CHAT_ONLY_DETAIL, IS_ROCM, DETECTION_GENERATION+ global _CPU_TRAINING_REASONwith _DETECT_LOCK:# A forced pass mutates the globals partway through; leaving the event set lets /api/health serve that as settled, so the sidebar MLX poll caches reason=None, stops, and leaves Train hidden on a repaired host.was_complete = DETECTION_COMPLETE.is_set()# Snapshot the whole verdict, not just the event: a raise mid-pass leaves a half-written answer the autorepair path swallows, and losing "mlx_unavailable" stops the sidebar poll for good.- published = (DEVICE, CHAT_ONLY, CHAT_ONLY_REASON, CHAT_ONLY_DETAIL, IS_ROCM)+ published = (+ DEVICE,+ CHAT_ONLY,+ CHAT_ONLY_REASON,+ CHAT_ONLY_DETAIL,+ IS_ROCM,+ _CPU_TRAINING_REASON,+ )# Owning epoch first, current only as a fallback: the MLX self-heal calls this after a pip install that can outlast the lifespan, and reading current would adopt the epoch shutdown moved to, so the next lifespan finds DEVICE set and skips its own detection.epoch = getattr(_OWNING_EPOCH, "value", None)if epoch is None:@@ -1575,7 +1586,9 @@ def detect_hardware() -> DeviceType:# Shutdown ran mid-pass. Restoring would put back the verdict it just cleared, and the next lifespan would treat that as measured._discard_detection_locked()raise- DEVICE, CHAT_ONLY, CHAT_ONLY_REASON, CHAT_ONLY_DETAIL, IS_ROCM = published+ DEVICE, CHAT_ONLY, CHAT_ONLY_REASON, CHAT_ONLY_DETAIL, IS_ROCM, _CPU_TRAINING_REASON = (+ published+ )# Restore rather than leave it clear: start_background_detection() declines once DEVICE is set, so an unset event keeps health provisional forever.if was_complete:DETECTION_COMPLETE.set()@@ -1668,7 +1681,7 @@ def _configure_rocm_miopen(torch) -> None:def _detect_hardware_locked() -> DeviceType:"""detect_hardware() body. Call only with _DETECT_LOCK held."""global DEVICE, CHAT_ONLY, CHAT_ONLY_REASON, CHAT_ONLY_DETAIL, IS_ROCM- global _MLX_BLOCKERS_MEASURED, CHAT_ONLY_MISMATCH_VENDORS+ global _MLX_BLOCKERS_MEASURED, CHAT_ONLY_MISMATCH_VENDORS, _CPU_TRAINING_REASONglobal _gfx_candidates_cache, _gfx_detect_epochCHAT_ONLY = True # reset -- only CUDA/ROCm/XPU/MLX sets it to False# A forced detection asks the ROCm CLIs again, and an older probe cannot publish.@@ -1682,6 +1695,7 @@ def _detect_hardware_locked() -> DeviceType:CHAT_ONLY_REASON = NoneCHAT_ONLY_DETAIL = NoneCHAT_ONLY_MISMATCH_VENDORS = frozenset()+ _CPU_TRAINING_REASON = None_MLX_BLOCKERS_MEASURED = NoneIS_ROCM = False@@ -1834,6 +1848,8 @@ def _detect_hardware_locked() -> DeviceType:# torch imported cleanly and reported no accelerator, which is NOT "this host has no GPU": a Windows update installs PyPI's 2.11.0+cpu over cu124 while nvidia-smi lists every card (#8473). Ask the OS before blaming hardware.CHAT_ONLY_REASON = "no_gpu"if torch_ok:+ # Only "no_gpu" trains here (trains_on_cpu()): a GPU this PyTorch cannot use still gets its repair message.+ _CPU_TRAINING_REASON = "no_gpu"_build_reason, _build_detail = _mismatch_verdict_for_this_host()if _build_reason is not None:CHAT_ONLY_REASON, CHAT_ONLY_DETAIL = _build_reason, _build_detail@@ -1846,10 +1862,10 @@ def _detect_hardware_locked() -> DeviceType:"with UNSLOTH_FORCE_ROCM_TORCH=1.",os.environ.get("CUDA_VISIBLE_DEVICES"),)- elif _installed_without_torch() and _a_gpu_build_would_train_here():- # GGUF-only by request: "needs a GPU" is wrong on a GPU host and nothing is broken.- # Without such a GPU it stays no_gpu: the Desktop offers the full install on no_torch.+ elif _installed_without_torch():+ # GGUF-only by request; the full install trains on the GPU, or on the CPU backend without one.CHAT_ONLY_REASON = "no_torch"+ _CPU_TRAINING_REASON = None if _a_gpu_build_would_train_here() else "no_torch"_record_chat_only_hint("no_torch", None)print("Hardware detected: CPU training backend (no PyTorch/MLX GPU backend available)")return DEVICE@@ -1918,6 +1934,11 @@ def _uncertainty_could_hide_the_frozen_mismatch(inventory: Dict[str, Any]) -> boreturn bool(unanswered & CHAT_ONLY_MISMATCH_VENDORS)+def trains_on_cpu(reason: Optional[str]) -> bool:+ """Whether ``reason`` (from current_chat_only_verdict()) trains on the CPU backend; CHAT_ONLY stays True either way."""+ return reason is not None and reason == _CPU_TRAINING_REASON++def current_chat_only_verdict() -> tuple[Optional[str], Optional[str]]:"""Re-derives the inventory-sensitive verdicts, so a late eGPU or driver is seen; never raises."""reason, detail = CHAT_ONLY_REASON, CHAT_ONLY_DETAIL@@ -2136,6 +2157,13 @@ def export_capability() -> dict:"Hardware detection failed on this host, so export is disabled. The server log records ""the underlying error; restart Unsloth Studio to retry detection.")+ elif verdict[0] == "no_torch" and trains_on_cpu("no_torch"):+ # The full install would train here on CPU only, so it does not bring export either.+ reason = "no_accelerator"+ message = (+ "Export requires an NVIDIA, AMD, or Intel GPU, or Apple Silicon (MLX). No supported "+ "accelerator was found on this host."+ )elif verdict[0] == "no_torch":reason = "no_torch"blocker = _no_torch_mac_without_mlx_wheels()diff --git a/studio/frontend/src/app/routes/__root.tsx b/studio/frontend/src/app/routes/__root.tsxindex 09443d95dea..d993c320a7d 100644--- a/studio/frontend/src/app/routes/__root.tsx+++ b/studio/frontend/src/app/routes/__root.tsx@@ -357,8 +357,10 @@ function waitsOutUnknownVerdict(pathname: string): boolean {);}-function isChatOnlyAllowed(pathname: string): boolean {+function isChatOnlyAllowed(pathname: string, trainAvailable: boolean): boolean {if (CHAT_ONLY_ALLOWED.has(pathname)) return true;+ if (trainAvailable && (pathname === "/studio" || pathname.startsWith("/studio/")))+ return true;if (pathname === "/data-recipes" || pathname.startsWith("/data-recipes/"))return true;// Images runs on CPU/MPS via sd.cpp; chat-only is about training/export.@@ -372,11 +374,11 @@ function isChatOnlyAllowed(pathname: string): boolean {export const Route = createRootRoute({beforeLoad: async ({ location }) => {await fetchDeviceType();- const { isChatOnly, capabilitiesUnknown } = usePlatformStore.getState();+ const { isChatOnly, isTrainUnavailable, capabilitiesUnknown } = usePlatformStore.getState();const unmeasured = capabilitiesUnknown();if (isChatOnly() &&- !isChatOnlyAllowed(location.pathname) &&+ !isChatOnlyAllowed(location.pathname, !isTrainUnavailable()) &&!(unmeasured && waitsOutUnknownVerdict(location.pathname))) {throw redirect({ to: "/chat" });@@ -409,12 +411,16 @@ function RootLayout() {const chatOnlyMeasured = usePlatformStore((s) => s.isChatOnly() && !s.capabilitiesUnknown(),);+ const trainBlocked = usePlatformStore(+ (s) => s.isTrainUnavailable() && !s.capabilitiesUnknown(),+ );const chatOnlyReason = usePlatformStore((s) => s.chatOnlyReason);// Video is the other row the sidebar grays out, on the two verdicts its pipelines cannot run on// at all. Same hint the row reads, so the two cannot disagree about which hosts they are.const videoCpuOptIn = usePlatformStore((s) => s.videoCpuOptIn);+ const cpuTraining = usePlatformStore((s) => s.cpuTraining);const videoDisabled =- videoNavHint(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn) !== undefined;+ videoNavHint(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn, cpuTraining) !== undefined;// Exact match: a prefix would treat /chatty as chat, hiding its not-found UI.const isChatRoute = pathname === "/chat";const { pinned, setPinned, togglePinned } = useSidebarPin();@@ -637,7 +643,7 @@ function RootLayout() {"go-projects": goAction(routeShortcutEnabled, goTo("/projects")),"go-library": goAction(routeShortcutEnabled, goTo("/library")),"go-hub": goAction(routeShortcutEnabled, goTo("/hub")),- "go-train": goAction(routeShortcutEnabled && !chatOnlyMeasured, goTo("/studio")),+ "go-train": goAction(routeShortcutEnabled && !trainBlocked, goTo("/studio")),"go-recipes": goAction(routeShortcutEnabled, goTo("/data-recipes")),"go-images": goAction(routeShortcutEnabled, goTo("/images")),"go-video": goAction(routeShortcutEnabled && !videoDisabled, goTo("/video")),@@ -660,7 +666,7 @@ function RootLayout() {});// Train's chord waits for a measured verdict, or it would bounce off /studio to /chat.useShortcut("switchToTrain", goTo("/studio"), {- enabled: routeShortcutEnabled && !chatOnlyMeasured,+ enabled: routeShortcutEnabled && !trainBlocked,});useShortcut("switchToRecipes", goTo("/data-recipes"), {enabled: routeShortcutEnabled,diff --git a/studio/frontend/src/components/app-sidebar.tsx b/studio/frontend/src/components/app-sidebar.tsxindex 20672a7535e..e8707ac0470 100644--- a/studio/frontend/src/components/app-sidebar.tsx+++ b/studio/frontend/src/components/app-sidebar.tsx@@ -1365,8 +1365,10 @@ export function AppSidebar() {}, [href, isMobile, setOpenMobile]);const chatOnly = usePlatformStore((s) => s.isChatOnly());+ const trainUnavailable = usePlatformStore((s) => s.isTrainUnavailable());const chatOnlyReason = usePlatformStore((s) => s.chatOnlyReason);const videoCpuOptIn = usePlatformStore((s) => s.videoCpuOptIn);+ const cpuTraining = usePlatformStore((s) => s.cpuTraining);const chatOnlyDetail = usePlatformStore((s) => s.chatOnlyDetail);const chatOnlyHint = usePlatformStore((s) => s.chatOnlyHint);const detectionDeferred = usePlatformStore((s) => s.detectionDeferred);@@ -1380,7 +1382,8 @@ export function AppSidebar() {// rows on a measured verdict and let them spin until it lands.const capabilitiesUnknown = usePlatformStore((s) => s.capabilitiesUnknown());const chatOnlyMeasured = chatOnly && !capabilitiesUnknown;- const trainDisabledHint: string | undefined = !chatOnlyMeasured+ const trainBlocked = trainUnavailable && !capabilitiesUnknown;+ const trainDisabledHint: string | undefined = !trainBlocked? undefined: chatOnlyReason === "mlx_unavailable"? // The gate is all-or-nothing across mlx, mlx-lm and mlx-vlm, and a resolver@@ -1412,10 +1415,11 @@ export function AppSidebar() {? `Training needs a working PyTorch GPU build. This machine's GPUs were detected but PyTorch ${chatOnlyDetail} cannot use them; repair the installation.`: "Training needs a working PyTorch GPU build. This machine's GPUs were detected but PyTorch cannot use them; repair the installation.": chatOnlyReason === "no_gpu"- ? "Training needs an NVIDIA or AMD GPU."+ ? // With PyTorch this host trains on CPU; without it there is nothing to train with.+ "Training needs PyTorch, which is not installed. Reinstall without --no-torch to enable Train.": undefined;// Everything without a hint reaches VideoPage, which answers from the backend's video verdict.- const videoDisabledHint = videoNavHint(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn);+ const videoDisabledHint = videoNavHint(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn, cpuTraining);const videoDisabled = videoDisabledHint !== undefined;// MLX self-heal or late detection can change the verdict after first health; re-poll.@@ -1606,10 +1610,10 @@ export function AppSidebar() {hasMore: runsHaveMore,loadMore: loadMoreRuns,} = useTrainingHistorySidebarItems(- !chatOnly && trainingRecentsRoute,+ !trainUnavailable && trainingRecentsRoute,);const showTrainingRecents =- !chatOnly && trainingRecentsRoute && runItems.length > 0;+ !trainUnavailable && trainingRecentsRoute && runItems.length > 0;const { displayTitle, avatarDataUrl } = useEffectiveProfile();const { projects, hasLoaded: projectsLoaded } = useChatProjects();@@ -3383,8 +3387,8 @@ export function AppSidebar() {icon: TestTubeOutlineIcon,label: t("shell.navigation.train"),active: pathname === "/studio" || pathname.startsWith("/studio/"),- disabled: chatOnlyMeasured && !fullInstall,- dimmed: chatOnlyMeasured && fullInstall !== null,+ disabled: trainBlocked && !fullInstall,+ dimmed: trainBlocked && fullInstall !== null,tooltip: fullInstall? "Training is not installed. It needs at least 5 GB of disk space.": trainDisabledHint,@@ -3395,7 +3399,7 @@ export function AppSidebar() {pending: capabilitiesUnknown,pendingTooltip: t("shell.navigation.trainChecking"),onClick: () => {- if (chatOnlyMeasured) {+ if (trainBlocked) {if (fullInstall) {setFullInstallOpen(true);closeMobileIfOpen();@@ -3406,7 +3410,7 @@ export function AppSidebar() {closeMobileIfOpen();},onIntent: () => {- if (chatOnlyMeasured) return;+ if (trainBlocked) return;preloadSilently(router.preloadRoute({ to: "/studio" }));},},diff --git a/studio/frontend/src/config/env.ts b/studio/frontend/src/config/env.tsindex 56da3119f1f..8f23a1c6b5e 100644--- a/studio/frontend/src/config/env.ts+++ b/studio/frontend/src/config/env.ts@@ -7,6 +7,7 @@ import {isDetectionDeferred,isProvisionalVerdict,resolveVerdict,+ trainsOnCpu,} from "@/config/hardware-verdict";import { create } from "zustand";@@ -43,6 +44,8 @@ interface PlatformState {// Developer mode's CPU video opt-in, from authed /api/health; keeps the Video row navigable// on a no-GPU host that opted in.videoCpuOptIn: boolean;+ // authed /api/health cpu_training: training runs (or would, on "no_torch") on the CPU backend.+ cpuTraining: boolean;// authenticated /api/health values for cloudflareUrl, serverUrl, and secure.cloudflareUrl: string | null;serverUrl: string | null;@@ -53,6 +56,9 @@ interface PlatformState {// torch-warm kill switch defers detection to first use; the sidebar polls.detectionDeferred: boolean;isChatOnly: () => boolean;+ // Train and /studio are off: chat-only, except a host that trains on the CPU backend.+ isTrainUnavailable: () => boolean;+ isCpuTrainingHost: () => boolean;// true until /api/health returns a verdict; guesses cannot gate features.capabilitiesUnknown: () => boolean;}@@ -78,6 +84,7 @@ export const usePlatformStore = create<PlatformState>()((_, get) => ({chatOnlyDetail: null,chatOnlyHint: null,videoCpuOptIn: false,+ cpuTraining: false,cloudflareUrl: null,serverUrl: null,secure: false,@@ -86,6 +93,11 @@ export const usePlatformStore = create<PlatformState>()((_, get) => ({verdictStale: false,detectionDeferred: false,isChatOnly: () => get().chatOnly,+ isTrainUnavailable: () => get().chatOnly && !get().isCpuTrainingHost(),+ isCpuTrainingHost: () => {+ const state = get();+ return state.chatOnly && trainsOnCpu(state.chatOnlyReason, state.cpuTraining);+ },// deferred detection is settled because no verdict will arrive this session.capabilitiesUnknown: () => {const state = get();@@ -227,6 +239,7 @@ async function readHealth(chat_only?: boolean;chat_only_reason?: string | null;video_cpu_opt_in?: boolean;+ cpu_training?: boolean;hardware_detecting?: boolean;cloudflare_url?: string | null;server_url?: string | null;@@ -292,6 +305,8 @@ async function readHealth(data.video_cpu_opt_in === undefined? previous.videoCpuOptIn: data.video_cpu_opt_in === true,+ cpuTraining:+ data.cpu_training === undefined ? previous.cpuTraining : data.cpu_training === true,cloudflareUrl: data.cloudflare_url ?? null,serverUrl: data.server_url ?? null,secure: data.secure ?? false,diff --git a/studio/frontend/src/config/hardware-verdict.ts b/studio/frontend/src/config/hardware-verdict.tsindex 6ba3321c853..c9868ee0774 100644--- a/studio/frontend/src/config/hardware-verdict.ts+++ b/studio/frontend/src/config/hardware-verdict.ts@@ -30,6 +30,11 @@ export function isDetectionDeferred(data: HealthVerdict): boolean {}+/** /api/health cpu_training on "no_gpu": Train runs on the CPU backend while chat stays GGUF-only. */+export function trainsOnCpu(chatOnlyReason: string | null, cpuTraining: boolean): boolean {+ return chatOnlyReason === "no_gpu" && cpuTraining;+}+/** Only reasons that leave no video device; Apple Silicon runs video on Metal regardless of MLX. */export function videoNavHint(chatOnlyMeasured: boolean,@@ -37,9 +42,13 @@ export function videoNavHint(// Developer mode's CPU video opt-in (/api/health video_cpu_opt_in). Waives only the plain// no-GPU host; VideoPage still answers from the backend's own video verdict.videoCpuOptIn = false,+ // On "no_torch": a GPU-less Chat only install, which the full install does not give video either.+ cpuTraining = false,): string | undefined {if (!chatOnlyMeasured) return undefined;if (chatOnlyReason === "no_gpu" && videoCpuOptIn) return undefined;+ if (chatOnlyReason === "no_torch" && cpuTraining)+ return "Video generation needs an NVIDIA or AMD GPU.";// Not "or a GPU": an Intel Mac's own dGPU is not one the video pipelines can use, so offering// that reads as a fix that would not work. Mirrors the backend's message for this host.if (chatOnlyReason === "intel_mac")diff --git a/studio/frontend/src/features/export/export-page.tsx b/studio/frontend/src/features/export/export-page.tsxindex a4a03fb93b2..4d3d62cd9fe 100644--- a/studio/frontend/src/features/export/export-page.tsx+++ b/studio/frontend/src/features/export/export-page.tsx@@ -290,6 +290,8 @@ export function ExportPage() {hardware.exportUnsupportedMessage,canUpgrade,);+ // Only where the full install brings export: without a GPU it trains on CPU and still cannot export.+ const offerFullInstall = canUpgrade && hardware.exportUnsupportedReason === "no_torch";const availableFormats = useMemo<MergedFormatOption[]>(() =>MERGED_FORMATS.filter((f) => {@@ -1595,7 +1597,7 @@ export function ExportPage() {<AlertTitle>Export unavailable</AlertTitle><AlertDescription>{exportUnsupportedMessage}- {fullInstall && (+ {offerFullInstall && (<div className="mt-2"><Buttonsize="xs"diff --git a/studio/frontend/src/features/settings/components/full-install-dialog.tsx b/studio/frontend/src/features/settings/components/full-install-dialog.tsxindex 6a12b25c317..1c263137280 100644--- a/studio/frontend/src/features/settings/components/full-install-dialog.tsx+++ b/studio/frontend/src/features/settings/components/full-install-dialog.tsx@@ -10,6 +10,7 @@ import {DialogHeader,DialogTitle,} from "@/components/ui/dialog";+import { usePlatformStore } from "@/config/env";import { useFullInstallUpgrade } from "@/hooks/use-full-install-upgrade";import { useT } from "@/i18n";import { type ReactElement, useState } from "react";@@ -25,13 +26,18 @@ export function FullInstallDialog({onConfirm: () => void;}): ReactElement {const t = useT();+ const cpuTraining = usePlatformStore((s) => s.cpuTraining);return (<Dialog open={open} onOpenChange={onOpenChange}><DialogContent className="max-w-md"><DialogHeader><DialogTitle>{t("settings.general.fullInstall.confirmTitle")}</DialogTitle><DialogDescription>- {t("settings.general.fullInstall.confirmDescription")}+ {t(+ cpuTraining+ ? "settings.general.fullInstall.confirmDescriptionCpu"+ : "settings.general.fullInstall.confirmDescription",+ )}</DialogDescription></DialogHeader><DialogFooter>@@ -56,6 +62,7 @@ export function FullInstallDialog({export function DesktopInstallTypeControl(): ReactElement | null {const t = useT();const controller = useFullInstallUpgrade();+ const cpuTraining = usePlatformStore((s) => s.cpuTraining);const [confirmOpen, setConfirmOpen] = useState(false);if (!controller) return null;@@ -63,7 +70,11 @@ export function DesktopInstallTypeControl(): ReactElement | null {<><SettingsRowlabel={t("settings.general.fullInstall.label")}- description={t("settings.general.fullInstall.description")}+ description={t(+ cpuTraining+ ? "settings.general.fullInstall.descriptionCpu"+ : "settings.general.fullInstall.description",+ )}><Button size="sm" onClick={() => setConfirmOpen(true)}>{t("settings.general.fullInstall.action")}diff --git a/studio/frontend/src/features/settings/tabs/data-tab.tsx b/studio/frontend/src/features/settings/tabs/data-tab.tsxindex a9f2d8a73f9..24dd721eb2b 100644--- a/studio/frontend/src/features/settings/tabs/data-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/data-tab.tsx@@ -218,8 +218,8 @@ export function DataTab({ searchEntry }: { searchEntry?: string }) {const [fineTuneExporting, setFineTuneExporting] = useState(false);const [openingRecipe, setOpeningRecipe] = useState(false);const [loadingTraining, setLoadingTraining] = useState(false);- // Chat-only hosts redirect /studio, so a Train-tab load would strand the user.- const chatOnly = usePlatformStore((s) => s.isChatOnly());+ // Hosts that cannot train redirect /studio, so a Train-tab load would strand the user.+ const trainUnavailable = usePlatformStore((s) => s.isTrainUnavailable());const ragUnavailable = useRagAvailabilityStore((s) => s.isUnavailable());const ragAvailabilityUnknown = useRagAvailabilityStore((s) =>s.availabilityUnknown(),@@ -233,9 +233,9 @@ export function DataTab({ searchEntry }: { searchEntry?: string }) {const restoredAction = FINE_TUNE_ACTIONS.includes(storedFineTuneAction)? storedFineTuneAction: "export";- // derived, not corrected: a stored "train" returns when chat-only flips off.+ // derived, not corrected: a stored "train" returns when Train becomes available.const fineTuneAction =- chatOnly && restoredAction === "train" ? "export" : restoredAction;+ trainUnavailable && restoredAction === "train" ? "export" : restoredAction;const fineTuneFormat: FineTuneFormat = "openai";// Search needs the main-page anchors even when a subpage is open.useEffect(() => {@@ -571,7 +571,7 @@ export function DataTab({ searchEntry }: { searchEntry?: string }) {const fineTuneBusy = loadingTraining || openingRecipe || fineTuneExporting;const runFineTuneAction = () => {if (fineTuneAction === "train") {- if (chatOnly) return;+ if (trainUnavailable) return;void handleUseInTraining();} else if (fineTuneAction === "recipes") void handleOpenInRecipes();else void handleFineTuneExport();@@ -1026,7 +1026,7 @@ export function DataTab({ searchEntry }: { searchEntry?: string }) {{FINE_TUNE_ACTIONS.map((action) => (<DropdownMenuItemkey={action}- disabled={action === "train" && chatOnly}+ disabled={action === "train" && trainUnavailable}onSelect={() => setFineTuneAction(action)}><span className="flex-1">diff --git a/studio/frontend/src/features/studio/sections/drafter-section.tsx b/studio/frontend/src/features/studio/sections/drafter-section.tsxindex af24f76c414..b094af6ff52 100644--- a/studio/frontend/src/features/studio/sections/drafter-section.tsx+++ b/studio/frontend/src/features/studio/sections/drafter-section.tsx@@ -31,6 +31,7 @@ import { ParamsRow } from "./params-section-controls";export function DrafterSection(): ReactElement | null {const t = useT();const deviceType = usePlatformStore((state) => state.deviceType);+ const trainsOnCpu = usePlatformStore((state) => state.isCpuTrainingHost());const store = useTrainingConfigStore(useShallow((state) => ({selectedModel: state.selectedModel,@@ -53,8 +54,8 @@ export function DrafterSection(): ReactElement | null {const [open, setOpen] = useState(false);useDrafterCapability(open || store.enabled);- // MLX trains through its own worker, which has no drafter phase.- if (!store.eligible || deviceType === "mac") {+ // MLX trains through its own worker, which has no drafter phase; the CPU backend has none either.+ if (!store.eligible || deviceType === "mac" || trainsOnCpu) {return null;}diff --git a/studio/frontend/src/features/studio/studio-page.tsx b/studio/frontend/src/features/studio/studio-page.tsxindex aa561664471..4421115aad8 100644--- a/studio/frontend/src/features/studio/studio-page.tsx+++ b/studio/frontend/src/features/studio/studio-page.tsx@@ -83,13 +83,16 @@ export function StudioPage(): ReactElement {})),);const capabilitiesUnknown = usePlatformStore((s) => s.capabilitiesUnknown());- const chatOnly = usePlatformStore((s) => s.isChatOnly());+ const trainUnavailable = usePlatformStore((s) => s.isTrainUnavailable());+ const trainsOnCpu = usePlatformStore(+ (s) => s.isCpuTrainingHost() && !s.capabilitiesUnknown(),+ );const navigate = useNavigate();- // The guard let this load on a guess; leave once the host is confirmed chat-only.+ // The guard let this load on a guess; leave once the host is confirmed unable to train.useEffect(() => {- if (capabilitiesUnknown || !chatOnly) return;+ if (capabilitiesUnknown || !trainUnavailable) return;void navigate({ to: "/chat", replace: true });- }, [capabilitiesUnknown, chatOnly, navigate]);+ }, [capabilitiesUnknown, trainUnavailable, navigate]);const hfToken = useHfTokenStore((s) => s.token);const selectedModel = useTrainingConfigStore((s) => s.selectedModel);const ensureModelDefaultsLoaded = useTrainingConfigStore(@@ -245,6 +248,11 @@ export function StudioPage(): ReactElement {) : (<><TabsContent value="configure" className="mt-0">+ {trainsOnCpu && (+ <p className="mb-6 rounded-2xl border border-border/60 px-4 py-3 text-sm text-muted-foreground">+ {t("studio.cpuTrainingNotice")}+ </p>+ )}<div className="@container/train-configure">{/* 64rem only fit windows 1376px and wider; 56rem still clears @md/train-section */}<div className="grid grid-cols-1 gap-8 @4xl/train-configure:grid-cols-[minmax(0,1fr)_320px] @5xl/train-configure:gap-10">diff --git a/studio/frontend/src/features/studio/training-api-button.tsx b/studio/frontend/src/features/studio/training-api-button.tsxindex d6eec316910..cb2901250e8 100644--- a/studio/frontend/src/features/studio/training-api-button.tsx+++ b/studio/frontend/src/features/studio/training-api-button.tsx@@ -12,6 +12,7 @@ import {trainingApiRequestFromPayload,useSettingsDialogStore,} from "@/features/settings";+import { usePlatformStore } from "@/config/env";import { useTrainingConfigStore } from "@/features/training";import { buildTrainingStartPayload } from "@/features/training/api/mappers";import { useT } from "@/i18n";@@ -25,7 +26,12 @@ export function TrainingApiButton(): ReactElement {const label = t("settings.apiKeys.audioApi.useViaApi");const openTrainingApi = () => {const config = useTrainingConfigStore.getState();- const payload = buildTrainingStartPayload(config, null);+ const payload = buildTrainingStartPayload(+ config,+ null,+ null,+ usePlatformStore.getState().isCpuTrainingHost(),+ );const uploaded = config.datasetSource === "upload" ? config.uploadedFile : null;useSettingsDialogStore.getState()diff --git a/studio/frontend/src/features/training/api/mappers.ts b/studio/frontend/src/features/training/api/mappers.tsindex e0110cab1a0..2c405a2c3da 100644--- a/studio/frontend/src/features/training/api/mappers.ts+++ b/studio/frontend/src/features/training/api/mappers.ts@@ -165,6 +165,8 @@ export function buildTrainingStartPayload(config: TrainingConfigState,hfToken: string | null,system: SystemInfoResponse | null = null,+ // The platform store's isCpuTrainingHost(): settled with the health verdict, unlike /api/system.+ cpuTrainingHost = false,): TrainingStartRequest {const isDecision = config.modelType === "decision";// Laya trains in 16-bit (LoRA or full); Clef and an LLM decision model also take QLoRA.@@ -314,18 +316,19 @@ export function buildTrainingStartPayload(? config.tensorboardDir.trim() || null: null,// Spread only when sent: a run without a drafter posts exactly the fields it did before.- ...(sendsDrafter(config, system)+ ...(sendsDrafter(config, system, cpuTrainingHost)? { drafter: drafterRequestFrom(config) }: {}),};}-/** On, a run type with a drafter phase, not MLX, and not a model the backend said cannot train one.+/** On, a run type with a drafter phase, not MLX or the CPU backend, and not a model the backend said cannot train one.* A capability check still pending (or for a previous model) sends it: the backend re-checks the* model before the drafter phase and reports a warning instead of dropping the request silently. */export function sendsDrafter(config: TrainingConfigState,system: SystemInfoResponse | null = null,+ cpuTrainingHost = false,): boolean {const capability = config.drafterCapability;const refused =@@ -337,6 +340,8 @@ export function sendsDrafter(config.drafterEnabled &&drafterEligible(config) &&system?.device_backend !== "mlx" &&+ !cpuTrainingHost &&+ system?.device_backend !== "cpu" &&!refused);}diff --git a/studio/frontend/src/features/training/lib/start-fresh-training-run.ts b/studio/frontend/src/features/training/lib/start-fresh-training-run.tsindex 9bfd3a759ef..b68c1b964ea 100644--- a/studio/frontend/src/features/training/lib/start-fresh-training-run.ts+++ b/studio/frontend/src/features/training/lib/start-fresh-training-run.ts@@ -543,7 +543,12 @@ async function submitFreshTrainingRun(return attempt.cancel(translate(validation.errorKey));}- const payload = buildTrainingStartPayload(attempt.config, hfToken, getCachedSystemInfo());+ const payload = buildTrainingStartPayload(+ attempt.config,+ hfToken,+ getCachedSystemInfo(),+ usePlatformStore.getState().isCpuTrainingHost(),+ );if (!attempt.enterTransport()) {return false;}diff --git a/studio/frontend/src/hooks/tauri-repair-context.ts b/studio/frontend/src/hooks/tauri-repair-context.tsindex ba58ad0ff1d..93545e566a4 100644--- a/studio/frontend/src/hooks/tauri-repair-context.ts+++ b/studio/frontend/src/hooks/tauri-repair-context.ts@@ -20,7 +20,7 @@ export function useTauriRepairController(): TauriRepairController | null {return useContext(TauriRepairContext);}-/** Off Mac the backend reports `no_torch` only with a usable GPU; `chat_only_hint` marks a Mac the MLX wheels skip. */+/** Off Mac the full install trains on the GPU, or on the CPU when there is none (`cpu_training`); `chat_only_hint` marks a Mac the MLX wheels skip. */export function canUpgradeToFullInstall(chatOnlyReason: string | null,chatOnlyHint: string | null,diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 7109cc5ad99..6b21525fa86 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -2146,10 +2146,14 @@ export const ar = {label: "نوع التثبيت",description:"دردشة فقط (GGUF). يضيف التثبيت الكامل التدريب والتصدير والفيديو ونماذج safetensors وميزات إضافية لتوليد الصور.",+ descriptionCpu:+ "دردشة فقط (GGUF). لم يُعثر على وحدة معالجة رسومات مدعومة، لذا يضيف التثبيت الكامل التدريب على المعالج المركزي.",action: "الترقية إلى التثبيت الكامل",confirmTitle: "هل تريد الترقية إلى التثبيت الكامل؟",confirmDescription:"يشغّل تثبيت الدردشة فقط هذا نماذج GGUF. يضيف التثبيت الكامل PyTorch لوحدة معالجة الرسومات في هذا الجهاز، ما يتيح التدريب والتصدير والفيديو ونماذج safetensors وميزات إضافية لتوليد الصور. ينزّل عدة غيغابايت (5 غيغابايت على الأقل من مساحة القرص) ثم يعيد تشغيل الخادم. تُحفظ المحادثات والنماذج والإعدادات. قد يستغرق ذلك عدة دقائق.",+ confirmDescriptionCpu:+ "يشغّل تثبيت الدردشة فقط هذا نماذج GGUF. لم يُعثر على وحدة معالجة رسومات مدعومة في هذا الجهاز، لذا يضيف التثبيت الكامل PyTorch للمعالج المركزي، ما يتيح التدريب على المعالج المركزي. التدريب على المعالج المركزي أبطأ بكثير من التدريب على وحدة معالجة الرسومات. يحتاج إلى 5 غيغابايت على الأقل من مساحة القرص ثم يعيد تشغيل الخادم. تُحفظ المحادثات والنماذج والإعدادات. قد يستغرق ذلك عدة دقائق.",confirmAction: "ترقية",keywords:"full install upgrade نوع التثبيت التثبيت الكامل ترقية دردشة فقط chat only gguf add training تدريب train fine-tune pytorch torch تصدير فيديو توليد الصور safetensors",@@ -3610,6 +3614,8 @@ export const ar = {imageTraining: "تدريب الصور",goToImageTraining: "تدريب LoRA للصور",routeTitle: "تدريب",+ cpuTrainingNotice:+ "لم يُعثر على وحدة معالجة رسومات، لذا يجري التدريب على المعالج المركزي. وهو أبطأ بكثير من التدريب على وحدة معالجة الرسومات ويدعم النماذج النصية فقط (LoRA أو الضبط الدقيق الكامل).",wizard: {modelTitle: "النموذج",modelDescription: "اختر النموذج وطريقة التدريب",diff --git a/studio/frontend/src/i18n/locales/cs.ts b/studio/frontend/src/i18n/locales/cs.tsindex 9b025942bf8..825de10d5b7 100644--- a/studio/frontend/src/i18n/locales/cs.ts+++ b/studio/frontend/src/i18n/locales/cs.ts@@ -2373,10 +2373,14 @@ export const cs = {label: "Typ instalace",description:"Pouze chat (GGUF). Úplná instalace přidává trénování, export, video, modely safetensors a další funkce generování obrázků.",+ descriptionCpu:+ "Pouze chat (GGUF). Nebyla nalezena podporovaná GPU, takže úplná instalace přidává trénování na CPU.",action: "Upgradovat na úplnou instalaci",confirmTitle: "Upgradovat na úplnou instalaci?",confirmDescription:"Tato instalace Pouze chat spouští modely GGUF. Úplná instalace přidává PyTorch pro GPU tohoto počítače, což umožňuje trénování, export, video, modely safetensors a další funkce generování obrázků. Stáhne několik gigabajtů (potřeba je alespoň 5 GB místa na disku) a restartuje server. Chaty, modely a nastavení zůstanou zachovány. Může to trvat několik minut.",+ confirmDescriptionCpu:+ "Tato instalace Pouze chat spouští modely GGUF. V tomto počítači nebyla nalezena podporovaná GPU, takže úplná instalace přidává PyTorch pro CPU, což umožňuje trénování na CPU. Trénování na CPU je mnohem pomalejší než na GPU. Je potřeba alespoň 5 GB místa na disku a server se restartuje. Chaty, modely a nastavení zůstanou zachovány. Může to trvat několik minut.",confirmAction: "Upgradovat",keywords:"úplná instalace upgrade typ instalace pouze chat gguf přidat trénování trénovat doladění fine-tune pytorch torch export video generování obrázků safetensors full install training",@@ -3926,6 +3930,8 @@ export const cs = {},studio: {routeTitle: "Trénování",+ cpuTrainingNotice:+ "Nebyla nalezena žádná GPU, takže trénování běží na CPU. Je mnohem pomalejší než trénování na GPU a podporuje pouze textové modely (LoRA nebo úplné doladění).",wizard: {modelTitle: "Model",modelDescription: "Vyberte model a metodu trénování",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex bb4b94b963e..a9dd75a04ad 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -2176,10 +2176,14 @@ export const de = {label: "Installationstyp",description:"Nur Chat (GGUF). Die vollständige Installation ergänzt Training, Export, Video, Safetensors-Modelle und weitere Funktionen zur Bildgenerierung.",+ descriptionCpu:+ "Nur Chat (GGUF). Es wurde keine unterstützte GPU gefunden, daher ergänzt die vollständige Installation Training auf der CPU.",action: "Auf vollständige Installation upgraden",confirmTitle: "Auf die vollständige Installation upgraden?",confirmDescription:"Diese Nur-Chat-Installation führt GGUF-Modelle aus. Die vollständige Installation ergänzt PyTorch für die GPU dieses Rechners und ermöglicht damit Training, Export, Video, Safetensors-Modelle und weitere Funktionen zur Bildgenerierung. Sie lädt mehrere Gigabyte herunter (mindestens 5 GB Speicherplatz) und startet den Server neu. Chats, Modelle und Einstellungen bleiben erhalten. Dies kann einige Minuten dauern.",+ confirmDescriptionCpu:+ "Diese Nur-Chat-Installation führt GGUF-Modelle aus. Auf diesem Rechner wurde keine unterstützte GPU gefunden, daher ergänzt die vollständige Installation PyTorch für die CPU und ermöglicht damit Training auf der CPU. CPU-Training ist deutlich langsamer als GPU-Training. Sie benötigt mindestens 5 GB Speicherplatz und startet den Server neu. Chats, Modelle und Einstellungen bleiben erhalten. Dies kann einige Minuten dauern.",confirmAction: "Upgraden",keywords:"full install upgrade installationstyp vollständige installation nur chat chat only gguf add training training trainieren train fine-tune pytorch torch export video bildgenerierung safetensors",@@ -3661,6 +3665,8 @@ export const de = {imageTraining: "Bildtraining",goToImageTraining: "Bild-LoRAs trainieren",routeTitle: "Trainieren",+ cpuTrainingNotice:+ "Es wurde keine GPU gefunden, daher läuft das Training auf der CPU. Es ist deutlich langsamer als GPU-Training und unterstützt nur Textmodelle (LoRA oder vollständiges Finetuning).",wizard: {modelTitle: "Modell",modelDescription: "Modell und Trainingsmethode auswählen",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 5c0f33db2d5..4b18fb6c35a 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -2180,10 +2180,14 @@ export const en = {label: "Install type",description:"Chat only (GGUF). The full install adds training, export, video, safetensors models and additional image generation features.",+ descriptionCpu:+ "Chat only (GGUF). No supported GPU was found, so the full install adds training on the CPU.",action: "Upgrade to full install",confirmTitle: "Upgrade to the full install?",confirmDescription:"This Chat only install runs GGUF models. The full install adds PyTorch for this machine's GPU, which enables training, export, video, safetensors models and additional image generation features. It downloads several gigabytes (at least 5 GB of disk space) and restarts the server. Chats, models and settings are kept. This can take several minutes.",+ confirmDescriptionCpu:+ "This Chat only install runs GGUF models. No supported GPU was found on this machine, so the full install adds PyTorch for the CPU, which enables training on the CPU. CPU training is much slower than GPU training. It needs at least 5 GB of disk space and restarts the server. Chats, models and settings are kept. This can take several minutes.",confirmAction: "Upgrade",keywords:"full install upgrade install type chat only gguf add training train training fine-tune pytorch torch export video image generation safetensors",@@ -3621,6 +3625,8 @@ export const en = {},studio: {routeTitle: "Train",+ cpuTrainingNotice:+ "No GPU was found, so training runs on the CPU. It is much slower than GPU training and supports text models only (LoRA or full finetuning).",wizard: {modelTitle: "Model",modelDescription: "Select model and training method",diff --git a/studio/frontend/src/i18n/locales/es-419.ts b/studio/frontend/src/i18n/locales/es-419.tsindex de72db418f6..e19df6fa79f 100644--- a/studio/frontend/src/i18n/locales/es-419.ts+++ b/studio/frontend/src/i18n/locales/es-419.ts@@ -2392,10 +2392,14 @@ export const es419 = {label: "Tipo de instalación",description:"Solo chat (GGUF). La instalación completa agrega entrenamiento, exportación, video, modelos safetensors y más funciones de generación de imágenes.",+ descriptionCpu:+ "Solo chat (GGUF). No se encontró una GPU compatible, así que la instalación completa agrega entrenamiento en la CPU.",action: "Actualizar a la instalación completa",confirmTitle: "¿Actualizar a la instalación completa?",confirmDescription:"Esta instalación de solo chat ejecuta modelos GGUF. La instalación completa agrega PyTorch para la GPU de esta computadora, lo que habilita el entrenamiento, la exportación, el video, los modelos safetensors y más funciones de generación de imágenes. Descarga varios gigabytes (al menos 5 GB de espacio en disco) y reinicia el servidor. Se conservan los chats, los modelos y la configuración. Puede tardar varios minutos.",+ confirmDescriptionCpu:+ "Esta instalación de solo chat ejecuta modelos GGUF. No se encontró una GPU compatible en esta computadora, así que la instalación completa agrega PyTorch para la CPU, lo que habilita el entrenamiento en la CPU. Entrenar en la CPU es mucho más lento que en una GPU. Necesita al menos 5 GB de espacio en disco y reinicia el servidor. Se conservan los chats, los modelos y la configuración. Puede tardar varios minutos.",confirmAction: "Actualizar",keywords:"full install upgrade tipo de instalación instalación completa actualizar solo chat chat only gguf entrenamiento entrenar train training fine-tune ajuste fino pytorch torch exportar export video generación de imágenes safetensors",@@ -3972,6 +3976,8 @@ export const es419 = {},studio: {routeTitle: "Entrenar",+ cpuTrainingNotice:+ "No se encontró ninguna GPU, así que el entrenamiento se ejecuta en la CPU. Es mucho más lento que en una GPU y solo admite modelos de texto (LoRA o ajuste fino completo).",wizard: {modelTitle: "Modelo",modelDescription: "Selecciona el modelo y el método de entrenamiento",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 04893cda99d..2d6f32c2e58 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -2171,10 +2171,14 @@ export const es = {label: "Tipo de instalación",description:"Solo chat (GGUF). La instalación completa añade entrenamiento, exportación, vídeo, modelos safetensors y más funciones de generación de imágenes.",+ descriptionCpu:+ "Solo chat (GGUF). No se ha encontrado una GPU compatible, así que la instalación completa añade entrenamiento en la CPU.",action: "Actualizar a la instalación completa",confirmTitle: "¿Actualizar a la instalación completa?",confirmDescription:"Esta instalación de solo chat ejecuta modelos GGUF. La instalación completa añade PyTorch para la GPU de este equipo, lo que habilita el entrenamiento, la exportación, el vídeo, los modelos safetensors y más funciones de generación de imágenes. Descarga varios gigabytes (al menos 5 GB de espacio en disco) y reinicia el servidor. Se conservan las conversaciones, los modelos y los ajustes. Puede tardar varios minutos.",+ confirmDescriptionCpu:+ "Esta instalación de solo chat ejecuta modelos GGUF. No se ha encontrado una GPU compatible en este equipo, así que la instalación completa añade PyTorch para la CPU, lo que habilita el entrenamiento en la CPU. Entrenar en la CPU es mucho más lento que en una GPU. Necesita al menos 5 GB de espacio en disco y reinicia el servidor. Se conservan las conversaciones, los modelos y los ajustes. Puede tardar varios minutos.",confirmAction: "Actualizar",keywords:"full install upgrade tipo de instalación instalación completa actualizar solo chat chat only gguf add training entrenamiento entrenar train fine-tune pytorch torch exportar vídeo generación de imágenes safetensors",@@ -3655,6 +3659,8 @@ export const es = {imageTraining: "Entrenamiento de imagen",goToImageTraining: "Entrenar LoRA de imagen",routeTitle: "Entrenar",+ cpuTrainingNotice:+ "No se ha encontrado ninguna GPU, así que el entrenamiento se ejecuta en la CPU. Es mucho más lento que en una GPU y solo admite modelos de texto (LoRA o ajuste fino completo).",wizard: {modelTitle: "Modelo",modelDescription: "Selecciona el modelo y el método de entrenamiento",diff --git a/studio/frontend/src/i18n/locales/fa.ts b/studio/frontend/src/i18n/locales/fa.tsindex 13a9698fa1e..757505e4b7b 100644--- a/studio/frontend/src/i18n/locales/fa.ts+++ b/studio/frontend/src/i18n/locales/fa.ts@@ -2346,10 +2346,14 @@ export const fa = {label: "نوع نصب",description:"فقط گفتگو (GGUF). نصب کامل، آموزش، خروجی گرفتن، ویدیو، مدلهای safetensors و قابلیتهای بیشتر تولید تصویر را اضافه میکند.",+ descriptionCpu:+ "فقط گفتگو (GGUF). هیچ GPU پشتیبانیشدهای پیدا نشد، بنابراین نصب کامل آموزش روی CPU را اضافه میکند.",action: "ارتقا به نصب کامل",confirmTitle: "به نصب کامل ارتقا داده شود؟",confirmDescription:"این نصبِ «فقط گفتگو» مدلهای GGUF را اجرا میکند. نصب کامل، PyTorch را برای GPU این دستگاه اضافه میکند که آموزش، خروجی گرفتن، ویدیو، مدلهای safetensors و قابلیتهای بیشتر تولید تصویر را فعال میکند. چندین گیگابایت دانلود میکند (دستکم 5 GB فضای دیسک) و سرور را دوباره راهاندازی میکند. گفتگوها، مدلها و تنظیمات حفظ میشوند. این کار ممکن است چند دقیقه طول بکشد.",+ confirmDescriptionCpu:+ "این نصبِ «فقط گفتگو» مدلهای GGUF را اجرا میکند. هیچ GPU پشتیبانیشدهای روی این دستگاه پیدا نشد، بنابراین نصب کامل PyTorch را برای CPU اضافه میکند که آموزش روی CPU را فعال میکند. آموزش روی CPU بسیار کندتر از آموزش روی GPU است. دستکم 5 GB فضای دیسک لازم دارد و سرور را دوباره راهاندازی میکند. گفتگوها، مدلها و تنظیمات حفظ میشوند. این کار ممکن است چند دقیقه طول بکشد.",confirmAction: "ارتقا",keywords:"نصب کامل ارتقا نوع نصب فقط گفتگو افزودن آموزش تنظیم دقیق خروجی ویدیو تولید تصویر full install upgrade chat only gguf training fine-tune pytorch torch export video image generation safetensors",@@ -3894,6 +3898,8 @@ export const fa = {},studio: {routeTitle: "آموزش",+ cpuTrainingNotice:+ "هیچ GPU پیدا نشد، بنابراین آموزش روی CPU اجرا میشود. این کار بسیار کندتر از آموزش روی GPU است و فقط از مدلهای متنی پشتیبانی میکند (LoRA یا تنظیم دقیق کامل).",wizard: {modelTitle: "مدل",modelDescription: "انتخاب مدل و روش آموزش",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 8fbd408f838..21ee697b6f9 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -2174,10 +2174,14 @@ export const fr = {label: "Type d'installation",description:"Chat uniquement (GGUF). L'installation complète ajoute l'entraînement, l'export, la vidéo, les modèles safetensors et des fonctionnalités supplémentaires de génération d'images.",+ descriptionCpu:+ "Chat uniquement (GGUF). Aucun GPU compatible n'a été trouvé, l'installation complète ajoute donc l'entraînement sur le CPU.",action: "Passer à l'installation complète",confirmTitle: "Passer à l'installation complète ?",confirmDescription:"Cette installation Chat uniquement exécute des modèles GGUF. L'installation complète ajoute PyTorch pour le GPU de cette machine, ce qui active l'entraînement, l'export, la vidéo, les modèles safetensors et des fonctionnalités supplémentaires de génération d'images. Elle télécharge plusieurs gigaoctets (au moins 5 Go d'espace disque) et redémarre le serveur. Les discussions, les modèles et les paramètres sont conservés. Cela peut prendre plusieurs minutes.",+ confirmDescriptionCpu:+ "Cette installation Chat uniquement exécute des modèles GGUF. Aucun GPU compatible n'a été trouvé sur cette machine, l'installation complète ajoute donc PyTorch pour le CPU, ce qui active l'entraînement sur le CPU. L'entraînement sur CPU est beaucoup plus lent que sur GPU. Elle nécessite au moins 5 Go d'espace disque et redémarre le serveur. Les discussions, les modèles et les paramètres sont conservés. Cela peut prendre plusieurs minutes.",confirmAction: "Mettre à niveau",keywords:"full install upgrade type d'installation installation complète mise à niveau chat uniquement chat only gguf add training entraînement entraîner train fine-tune pytorch torch export vidéo génération d'images safetensors",@@ -3663,6 +3667,8 @@ export const fr = {imageTraining: "Entraînement d'image",goToImageTraining: "Entraîner des LoRA d'image",routeTitle: "Entraîner",+ cpuTrainingNotice:+ "Aucun GPU n'a été trouvé, l'entraînement s'exécute donc sur le CPU. Il est beaucoup plus lent que sur GPU et ne prend en charge que les modèles de texte (LoRA ou finetuning complet).",wizard: {modelTitle: "Modèle",modelDescription: "Sélectionner le modèle et la méthode d'entraînement",diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 5dadce733f1..930b5c04836 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -2220,10 +2220,14 @@ export const he = {label: "סוג התקנה",description:"צ'אט בלבד (GGUF). ההתקנה המלאה מוסיפה אימון, ייצוא, וידאו, מודלים של safetensors ותכונות נוספות ליצירת תמונות.",+ descriptionCpu:+ "צ'אט בלבד (GGUF). לא נמצא GPU נתמך, ולכן ההתקנה המלאה מוסיפה אימון על ה-CPU.",action: "שדרג להתקנה מלאה",confirmTitle: "לשדרג להתקנה המלאה?",confirmDescription:"התקנה זו של צ'אט בלבד מריצה מודלים של GGUF. ההתקנה המלאה מוסיפה את PyTorch עבור ה-GPU של מכונה זו, ומאפשרת אימון, ייצוא, וידאו, מודלים של safetensors ותכונות נוספות ליצירת תמונות. היא מורידה כמה ג'יגה-בייט (לפחות 5 GB של שטח דיסק) ומפעילה מחדש את השרת. הצ'אטים, המודלים וההגדרות יישמרו. התהליך עשוי להימשך מספר דקות.",+ confirmDescriptionCpu:+ "התקנה זו של צ'אט בלבד מריצה מודלים של GGUF. לא נמצא GPU נתמך במכונה זו, ולכן ההתקנה המלאה מוסיפה את PyTorch עבור ה-CPU, ומאפשרת אימון על ה-CPU. אימון על CPU איטי בהרבה מאימון על GPU. היא דורשת לפחות 5 GB של שטח דיסק ומפעילה מחדש את השרת. הצ'אטים, המודלים וההגדרות יישמרו. התהליך עשוי להימשך מספר דקות.",confirmAction: "שדרג",keywords:"full install upgrade סוג התקנה התקנה מלאה שדרוג צ'אט בלבד chat only gguf add training אימון train fine-tune pytorch torch ייצוא וידאו יצירת תמונות safetensors",@@ -3691,6 +3695,8 @@ export const he = {},studio: {routeTitle: "אימון",+ cpuTrainingNotice:+ "לא נמצא GPU, ולכן האימון רץ על ה-CPU. הוא איטי בהרבה מאימון על GPU ותומך במודלי טקסט בלבד (LoRA או כוונון מלא).",wizard: {modelTitle: "מודל",modelDescription: "בחר מודל ושיטת אימון",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 853f4cca0af..20fd7f37ead 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -2152,10 +2152,14 @@ export const hi = {label: "इंस्टॉल का प्रकार",description:"केवल चैट (GGUF)। पूरा इंस्टॉल ट्रेनिंग, एक्सपोर्ट, वीडियो, safetensors मॉडल और इमेज जनरेशन की अतिरिक्त सुविधाएं जोड़ता है।",+ descriptionCpu:+ "केवल चैट (GGUF)। कोई समर्थित GPU नहीं मिला, इसलिए पूरा इंस्टॉल CPU पर ट्रेनिंग जोड़ता है।",action: "पूरे इंस्टॉल में अपग्रेड करें",confirmTitle: "क्या पूरे इंस्टॉल में अपग्रेड करना है?",confirmDescription:"यह केवल-चैट इंस्टॉल GGUF मॉडल चलाता है। पूरा इंस्टॉल इस मशीन के GPU के लिए PyTorch जोड़ता है, जिससे ट्रेनिंग, एक्सपोर्ट, वीडियो, safetensors मॉडल और इमेज जनरेशन की अतिरिक्त सुविधाएं उपलब्ध हो जाते हैं। यह कई गीगाबाइट (कम से कम 5 GB डिस्क स्पेस) डाउनलोड करता है और सर्वर को रीस्टार्ट करता है। चैट, मॉडल और सेटिंग्स सुरक्षित रहती हैं। इसमें कई मिनट लग सकते हैं।",+ confirmDescriptionCpu:+ "यह केवल-चैट इंस्टॉल GGUF मॉडल चलाता है। इस मशीन पर कोई समर्थित GPU नहीं मिला, इसलिए पूरा इंस्टॉल CPU के लिए PyTorch जोड़ता है, जिससे CPU पर ट्रेनिंग उपलब्ध हो जाती है। CPU पर ट्रेनिंग GPU की तुलना में बहुत धीमी होती है। इसके लिए कम से कम 5 GB डिस्क स्पेस चाहिए और यह सर्वर को रीस्टार्ट करता है। चैट, मॉडल और सेटिंग्स बने रहते हैं। इसमें कुछ मिनट लग सकते हैं।",confirmAction: "अपग्रेड करें",keywords:"full install upgrade इंस्टॉल का प्रकार पूरा इंस्टॉल अपग्रेड केवल चैट chat only gguf add training ट्रेनिंग प्रशिक्षण train fine-tune pytorch torch एक्सपोर्ट वीडियो इमेज जनरेशन safetensors",@@ -3621,6 +3625,8 @@ export const hi = {imageTraining: "इमेज ट्रेनिंग",goToImageTraining: "इमेज LoRA ट्रेन करें",routeTitle: "ट्रेनिंग",+ cpuTrainingNotice:+ "कोई GPU नहीं मिला, इसलिए ट्रेनिंग CPU पर चलती है। यह GPU ट्रेनिंग से बहुत धीमी है और केवल टेक्स्ट मॉडल (LoRA या फुल फाइनट्यूनिंग) सपोर्ट करती है।",wizard: {modelTitle: "मॉडल",modelDescription: "मॉडल और ट्रेनिंग विधि चुनें",diff --git a/studio/frontend/src/i18n/locales/id.ts b/studio/frontend/src/i18n/locales/id.tsindex a0c7386f188..9cfe486815f 100644--- a/studio/frontend/src/i18n/locales/id.ts+++ b/studio/frontend/src/i18n/locales/id.ts@@ -2356,10 +2356,14 @@ export const id = {label: "Jenis instalasi",description:"Hanya chat (GGUF). Instalasi lengkap menambahkan pelatihan, ekspor, video, model safetensors, dan fitur pembuatan gambar tambahan.",+ descriptionCpu:+ "Hanya chat (GGUF). Tidak ditemukan GPU yang didukung, jadi instalasi lengkap menambahkan pelatihan di CPU.",action: "Tingkatkan ke instalasi lengkap",confirmTitle: "Tingkatkan ke instalasi lengkap?",confirmDescription:"Instalasi Hanya chat ini menjalankan model GGUF. Instalasi lengkap menambahkan PyTorch untuk GPU mesin ini, yang mengaktifkan pelatihan, ekspor, video, model safetensors, dan fitur pembuatan gambar tambahan. Proses ini mengunduh beberapa gigabyte (minimal 5 GB ruang disk) dan memulai ulang server. Chat, model, dan pengaturan tetap disimpan. Proses ini dapat memakan waktu beberapa menit.",+ confirmDescriptionCpu:+ "Instalasi Hanya chat ini menjalankan model GGUF. Tidak ditemukan GPU yang didukung di mesin ini, jadi instalasi lengkap menambahkan PyTorch untuk CPU, yang mengaktifkan pelatihan di CPU. Pelatihan di CPU jauh lebih lambat daripada di GPU. Proses ini memerlukan ruang disk minimal 5 GB dan memulai ulang server. Chat, model, dan pengaturan tetap disimpan. Proses ini dapat memakan waktu beberapa menit.",confirmAction: "Tingkatkan",keywords:"full install upgrade install type chat only gguf add training train training fine-tune pytorch torch export video image generation safetensors instalasi lengkap tingkatkan pelatihan latih ekspor gambar",@@ -3907,6 +3911,8 @@ export const id = {},studio: {routeTitle: "Latih",+ cpuTrainingNotice:+ "Tidak ditemukan GPU, jadi pelatihan berjalan di CPU. Pelatihan ini jauh lebih lambat daripada di GPU dan hanya mendukung model teks (LoRA atau finetuning penuh).",wizard: {modelTitle: "Model",modelDescription: "Pilih model dan metode pelatihan",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex a22861ad953..0eeb3ee87e0 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -2063,10 +2063,14 @@ export const it = {label: "Tipo di installazione",description:"Solo chat (GGUF). L'installazione completa aggiunge addestramento, esportazione, video, modelli safetensors e altre funzionalità di generazione di immagini.",+ descriptionCpu:+ "Solo chat (GGUF). Non è stata trovata una GPU supportata, quindi l'installazione completa aggiunge l'addestramento sulla CPU.",action: "Passa all'installazione completa",confirmTitle: "Passare all'installazione completa?",confirmDescription:"Questa installazione solo chat esegue modelli GGUF. L'installazione completa aggiunge PyTorch per la GPU di questa macchina, abilitando addestramento, esportazione, video, modelli safetensors e altre funzionalità di generazione di immagini. Scarica diversi gigabyte (almeno 5 GB di spazio su disco) e riavvia il server. Le chat, i modelli e le impostazioni vengono mantenuti. L'operazione può richiedere alcuni minuti.",+ confirmDescriptionCpu:+ "Questa installazione solo chat esegue modelli GGUF. Su questa macchina non è stata trovata una GPU supportata, quindi l'installazione completa aggiunge PyTorch per la CPU, abilitando l'addestramento sulla CPU. L'addestramento su CPU è molto più lento che su GPU. Richiede almeno 5 GB di spazio su disco e riavvia il server. Le chat, i modelli e le impostazioni vengono mantenuti. L'operazione può richiedere alcuni minuti.",confirmAction: "Aggiorna",keywords:"full install upgrade tipo di installazione installazione completa aggiorna solo chat chat only gguf add training addestramento addestrare train fine-tune pytorch torch esportazione video generazione di immagini safetensors",@@ -3656,6 +3660,8 @@ export const it = {imageTraining: "Addestramento immagini",goToImageTraining: "Addestra LoRA per immagini",routeTitle: "Addestra",+ cpuTrainingNotice:+ "Non è stata trovata alcuna GPU, quindi l'addestramento viene eseguito sulla CPU. È molto più lento che su GPU e supporta solo modelli di testo (LoRA o finetuning completo).",wizard: {modelTitle: "Modello",modelDescription: "Seleziona il modello e il metodo di addestramento",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 8d82180f3a0..d2f5817e7d4 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -2132,10 +2132,14 @@ export const ja = {label: "インストールの種類",description:"チャット専用 (GGUF)。フルインストールでは、トレーニング、エクスポート、動画、safetensors モデル、その他の画像生成機能が追加されます。",+ descriptionCpu:+ "チャット専用 (GGUF)。対応 GPU が見つからないため、フルインストールでは CPU でのトレーニングが追加されます。",action: "フルインストールにアップグレード",confirmTitle: "フルインストールにアップグレードしますか?",confirmDescription:"このチャット専用インストールは GGUF モデルを実行します。フルインストールでは、このマシンの GPU 向けの PyTorch が追加され、トレーニング、エクスポート、動画、safetensors モデル、その他の画像生成機能が使えるようになります。数 GB(5 GB 以上のディスク容量)をダウンロードしてサーバーを再起動します。チャット、モデル、設定は保持されます。数分かかる場合があります。",+ confirmDescriptionCpu:+ "このチャット専用インストールは GGUF モデルを実行します。このマシンには対応 GPU が見つからないため、フルインストールでは CPU 向けの PyTorch が追加され、CPU でのトレーニングが使えるようになります。CPU でのトレーニングは GPU よりも大幅に遅くなります。5 GB 以上のディスク容量が必要で、サーバーを再起動します。チャット、モデル、設定は保持されます。数分かかる場合があります。",confirmAction: "アップグレード",keywords:"full install upgrade インストールの種類 フルインストール アップグレード チャット専用 chat only gguf add training トレーニング 学習 train fine-tune pytorch torch エクスポート 動画 画像生成 safetensors",@@ -3579,6 +3583,8 @@ export const ja = {imageTraining: "画像トレーニング",goToImageTraining: "画像 LoRA をトレーニング",routeTitle: "トレーニング",+ cpuTrainingNotice:+ "GPU が見つからないため、トレーニングは CPU で実行されます。GPU でのトレーニングよりも大幅に遅く、テキストモデル (LoRA またはフルファインチューニング) のみに対応しています。",wizard: {modelTitle: "モデル",modelDescription: "モデルとトレーニング方法を選択",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex ef3097766e6..285f6fcf3da 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -2139,10 +2139,14 @@ export const ko = {label: "설치 유형",description:"채팅 전용(GGUF). 전체 설치에는 학습, 내보내기, 동영상, safetensors 모델, 더 많은 이미지 생성 기능이 추가됩니다.",+ descriptionCpu:+ "채팅 전용(GGUF). 지원되는 GPU가 없어 전체 설치에는 CPU 학습이 추가됩니다.",action: "전체 설치로 업그레이드",confirmTitle: "전체 설치로 업그레이드할까요?",confirmDescription:"이 채팅 전용 설치는 GGUF 모델을 실행합니다. 전체 설치는 이 컴퓨터의 GPU에 맞는 PyTorch를 추가하여 학습, 내보내기, 동영상, safetensors 모델, 더 많은 이미지 생성 기능을 사용할 수 있게 합니다. 수 GB(디스크 공간 5GB 이상)를 다운로드하고 서버를 다시 시작합니다. 채팅, 모델, 설정은 유지됩니다. 몇 분 정도 걸릴 수 있습니다.",+ confirmDescriptionCpu:+ "이 채팅 전용 설치는 GGUF 모델을 실행합니다. 이 컴퓨터에서 지원되는 GPU를 찾지 못했으므로 전체 설치는 CPU용 PyTorch를 추가하여 CPU에서 학습할 수 있게 합니다. CPU 학습은 GPU 학습보다 훨씬 느립니다. 디스크 공간이 5GB 이상 필요하며 서버를 다시 시작합니다. 채팅, 모델, 설정은 유지됩니다. 몇 분 정도 걸릴 수 있습니다.",confirmAction: "업그레이드",keywords:"full install upgrade 설치 유형 전체 설치 업그레이드 채팅 전용 chat only gguf add training 학습 훈련 train fine-tune pytorch torch 내보내기 동영상 이미지 생성 safetensors",@@ -3600,6 +3604,8 @@ export const ko = {imageTraining: "이미지 학습",goToImageTraining: "이미지 LoRA 학습",routeTitle: "학습",+ cpuTrainingNotice:+ "GPU를 찾지 못해 학습이 CPU에서 실행됩니다. GPU 학습보다 훨씬 느리며 텍스트 모델(LoRA 또는 전체 파인튜닝)만 지원합니다.",wizard: {modelTitle: "모델",modelDescription: "모델과 학습 방법 선택",diff --git a/studio/frontend/src/i18n/locales/nl.ts b/studio/frontend/src/i18n/locales/nl.tsindex 9372623a285..4eb88d6bf66 100644--- a/studio/frontend/src/i18n/locales/nl.ts+++ b/studio/frontend/src/i18n/locales/nl.ts@@ -2395,10 +2395,14 @@ export const nl = {label: "Installatietype",description:"Alleen chat (GGUF). De volledige installatie voegt training, export, video, safetensors-modellen en extra functies voor het genereren van afbeeldingen toe.",+ descriptionCpu:+ "Alleen chat (GGUF). Er is geen ondersteunde GPU gevonden, dus de volledige installatie voegt training op de CPU toe.",action: "Upgraden naar volledige installatie",confirmTitle: "Upgraden naar de volledige installatie?",confirmDescription:"Deze installatie voor Alleen chat draait GGUF-modellen. De volledige installatie voegt PyTorch toe voor de GPU van deze machine, waarmee training, export, video, safetensors-modellen en extra functies voor het genereren van afbeeldingen beschikbaar worden. Er worden enkele gigabytes gedownload (minimaal 5 GB schijfruimte) en de server wordt opnieuw gestart. Chats, modellen en instellingen blijven behouden. Dit kan enkele minuten duren.",+ confirmDescriptionCpu:+ "Deze installatie voor Alleen chat draait GGUF-modellen. Er is op deze machine geen ondersteunde GPU gevonden, dus de volledige installatie voegt PyTorch voor de CPU toe, waarmee training op de CPU beschikbaar wordt. Training op de CPU is veel trager dan op een GPU. Er is minimaal 5 GB schijfruimte nodig en de server wordt opnieuw gestart. Chats, modellen en instellingen blijven behouden. Dit kan enkele minuten duren.",confirmAction: "Upgraden",keywords:"volledige installatie upgraden installeren installatietype alleen chat gguf training trainen finetunen fine-tune pytorch torch export exporteren video afbeeldingen genereren safetensors",@@ -3956,6 +3960,8 @@ export const nl = {},studio: {routeTitle: "Trainen",+ cpuTrainingNotice:+ "Er is geen GPU gevonden, dus training draait op de CPU. Dit is veel trager dan training op een GPU en ondersteunt alleen tekstmodellen (LoRA of volledige finetuning).",wizard: {modelTitle: "Model",modelDescription: "Selecteer model en trainingsmethode",diff --git a/studio/frontend/src/i18n/locales/pl.ts b/studio/frontend/src/i18n/locales/pl.tsindex 16481217ba5..b7ca5eaf587 100644--- a/studio/frontend/src/i18n/locales/pl.ts+++ b/studio/frontend/src/i18n/locales/pl.ts@@ -2387,10 +2387,14 @@ export const pl = {label: "Typ instalacji",description:"Tylko czat (GGUF). Pełna instalacja dodaje trenowanie, eksport, wideo, modele safetensors i dodatkowe funkcje generowania obrazów.",+ descriptionCpu:+ "Tylko czat (GGUF). Nie znaleziono obsługiwanego GPU, więc pełna instalacja dodaje trenowanie na CPU.",action: "Uaktualnij do pełnej instalacji",confirmTitle: "Uaktualnić do pełnej instalacji?",confirmDescription:"Ta instalacja Tylko czat uruchamia modele GGUF. Pełna instalacja dodaje PyTorch dla GPU tego komputera, co umożliwia trenowanie, eksport, wideo, modele safetensors i dodatkowe funkcje generowania obrazów. Pobiera kilka gigabajtów (co najmniej 5 GB miejsca na dysku) i uruchamia ponownie serwer. Czaty, modele i ustawienia zostaną zachowane. Może to potrwać kilka minut.",+ confirmDescriptionCpu:+ "Ta instalacja Tylko czat uruchamia modele GGUF. Na tym komputerze nie znaleziono obsługiwanego GPU, więc pełna instalacja dodaje PyTorch dla CPU, co umożliwia trenowanie na CPU. Trenowanie na CPU jest znacznie wolniejsze niż na GPU. Wymaga co najmniej 5 GB miejsca na dysku i uruchamia ponownie serwer. Czaty, modele i ustawienia zostaną zachowane. Może to potrwać kilka minut.",confirmAction: "Uaktualnij",keywords:"full install upgrade install type chat only gguf add training train training fine-tune pytorch torch export video image generation safetensors pełna instalacja uaktualnij tylko czat trenowanie dostrajanie eksport wideo generowanie obrazów",@@ -3954,6 +3958,8 @@ export const pl = {},studio: {routeTitle: "Trenowanie",+ cpuTrainingNotice:+ "Nie znaleziono GPU, więc trenowanie odbywa się na CPU. Jest znacznie wolniejsze niż na GPU i obsługuje tylko modele tekstowe (LoRA lub pełny finetuning).",wizard: {modelTitle: "Model",modelDescription: "Wybierz model i metodę trenowania",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex 26bad62da6b..2cb040361fc 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -2163,10 +2163,14 @@ export const ptBR = {label: "Tipo de instalação",description:"Somente chat (GGUF). A instalação completa adiciona treinamento, exportação, vídeo, modelos safetensors e mais recursos de geração de imagens.",+ descriptionCpu:+ "Somente chat (GGUF). Nenhuma GPU compatível foi encontrada, então a instalação completa adiciona treinamento na CPU.",action: "Atualizar para a instalação completa",confirmTitle: "Atualizar para a instalação completa?",confirmDescription:"Esta instalação somente chat executa modelos GGUF. A instalação completa adiciona o PyTorch para a GPU desta máquina, o que habilita treinamento, exportação, vídeo, modelos safetensors e mais recursos de geração de imagens. Ela baixa vários gigabytes (pelo menos 5 GB de espaço em disco) e reinicia o servidor. As conversas, os modelos e as configurações são mantidos. Isso pode levar alguns minutos.",+ confirmDescriptionCpu:+ "Esta instalação somente chat executa modelos GGUF. Nenhuma GPU compatível foi encontrada nesta máquina, então a instalação completa adiciona o PyTorch para a CPU, o que habilita o treinamento na CPU. Treinar na CPU é muito mais lento do que na GPU. Ela precisa de pelo menos 5 GB de espaço em disco e reinicia o servidor. As conversas, os modelos e as configurações são mantidos. Isso pode levar alguns minutos.",confirmAction: "Atualizar",keywords:"full install upgrade tipo de instalação instalação completa atualizar somente chat chat only gguf add training treinamento treinar train fine-tune pytorch torch exportação vídeo geração de imagens safetensors",@@ -3630,6 +3634,8 @@ export const ptBR = {imageTraining: "Treino de imagem",goToImageTraining: "Treinar LoRAs de imagem",routeTitle: "Treinar",+ cpuTrainingNotice:+ "Nenhuma GPU foi encontrada, então o treinamento roda na CPU. Ele é muito mais lento do que na GPU e só suporta modelos de texto (LoRA ou ajuste fino completo).",wizard: {modelTitle: "Modelo",modelDescription: "Escolha um modelo e um método de treinamento",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 5ef37ba54d8..3388d15c93b 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -2156,10 +2156,14 @@ export const ru = {label: "Тип установки",description:"Только чат (GGUF). Полная установка добавляет обучение, экспорт, видео, модели safetensors и дополнительные функции генерации изображений.",+ descriptionCpu:+ "Только чат (GGUF). Поддерживаемый графический процессор не найден, поэтому полная установка добавляет обучение на CPU.",action: "Перейти на полную установку",confirmTitle: "Перейти на полную установку?",confirmDescription:"Эта установка «Только чат» запускает модели GGUF. Полная установка добавляет PyTorch для графического процессора этого компьютера, что включает обучение, экспорт, видео, модели safetensors и дополнительные функции генерации изображений. Она скачивает несколько гигабайт (не менее 5 ГБ на диске) и перезапускает сервер. Чаты, модели и настройки сохраняются. Это может занять несколько минут.",+ confirmDescriptionCpu:+ "Эта установка «Только чат» запускает модели GGUF. На этом компьютере не найден поддерживаемый графический процессор, поэтому полная установка добавляет PyTorch для CPU, что включает обучение на CPU. Обучение на CPU намного медленнее, чем на графическом процессоре. Для неё нужно не менее 5 ГБ на диске, и она перезапускает сервер. Чаты, модели и настройки сохраняются. Это может занять несколько минут.",confirmAction: "Перейти",keywords:"full install upgrade тип установки полная установка обновить только чат chat only gguf add training обучение обучить train fine-tune pytorch torch экспорт видео генерация изображений safetensors",@@ -3628,6 +3632,8 @@ export const ru = {imageTraining: "Обучение изображений",goToImageTraining: "Обучить LoRA для изображений",routeTitle: "Обучение",+ cpuTrainingNotice:+ "Графический процессор не найден, поэтому обучение выполняется на CPU. Оно намного медленнее, чем на графическом процессоре, и поддерживает только текстовые модели (LoRA или полное дообучение).",wizard: {modelTitle: "Модель",modelDescription: "Выберите модель и метод обучения",diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex 26ca495709a..5fbd3e7feb8 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -2292,10 +2292,14 @@ export const sv = {label: "Installationstyp",description:"Endast chatt (GGUF). Den fullständiga installationen lägger till träning, export, video, safetensors-modeller och fler funktioner för bildgenerering.",+ descriptionCpu:+ "Endast chatt (GGUF). Ingen GPU som stöds hittades, så den fullständiga installationen lägger till träning på CPU:n.",action: "Uppgradera till fullständig installation",confirmTitle: "Uppgradera till den fullständiga installationen?",confirmDescription:"Den här installationen med endast chatt kör GGUF-modeller. Den fullständiga installationen lägger till PyTorch för den här datorns GPU, vilket aktiverar träning, export, video, safetensors-modeller och fler funktioner för bildgenerering. Den laddar ner flera gigabyte (minst 5 GB diskutrymme) och startar om servern. Chattar, modeller och inställningar behålls. Det kan ta flera minuter.",+ confirmDescriptionCpu:+ "Den här installationen med endast chatt kör GGUF-modeller. Ingen GPU som stöds hittades på den här datorn, så den fullständiga installationen lägger till PyTorch för CPU:n, vilket aktiverar träning på CPU:n. Träning på CPU är mycket långsammare än på GPU. Den kräver minst 5 GB diskutrymme och startar om servern. Chattar, modeller och inställningar behålls. Det kan ta flera minuter.",confirmAction: "Uppgradera",keywords:"full install upgrade installationstyp fullständig installation uppgradera endast chatt chat only gguf add training träning träna train fine-tune pytorch torch export video bildgenerering safetensors",@@ -3798,6 +3802,8 @@ export const sv = {},studio: {routeTitle: "Träna",+ cpuTrainingNotice:+ "Ingen GPU hittades, så träningen körs på CPU:n. Den är mycket långsammare än GPU-träning och stöder endast textmodeller (LoRA eller fullständig finjustering).",wizard: {modelTitle: "Modell",modelDescription: "Välj modell och träningsmetod",diff --git a/studio/frontend/src/i18n/locales/th.ts b/studio/frontend/src/i18n/locales/th.tsindex 2246891b05f..bfa72886c4a 100644--- a/studio/frontend/src/i18n/locales/th.ts+++ b/studio/frontend/src/i18n/locales/th.ts@@ -2252,10 +2252,14 @@ export const th = {label: "ประเภทการติดตั้ง",description:"แชทเท่านั้น (GGUF) การติดตั้งแบบเต็มจะเพิ่มการเทรน การส่งออก วิดีโอ โมเดล safetensors และฟีเจอร์การสร้างรูปภาพเพิ่มเติม",+ descriptionCpu:+ "แชทเท่านั้น (GGUF) ไม่พบ GPU ที่รองรับ การติดตั้งแบบเต็มจึงเพิ่มการเทรนบน CPU",action: "อัปเกรดเป็นการติดตั้งแบบเต็ม",confirmTitle: "อัปเกรดเป็นการติดตั้งแบบเต็มหรือไม่",confirmDescription:"การติดตั้งแบบแชทเท่านั้นนี้รันโมเดล GGUF การติดตั้งแบบเต็มจะเพิ่ม PyTorch สำหรับ GPU ของเครื่องนี้ ซึ่งเปิดใช้การเทรน การส่งออก วิดีโอ โมเดล safetensors และฟีเจอร์การสร้างรูปภาพเพิ่มเติม โดยจะดาวน์โหลดหลายกิกะไบต์ (ใช้พื้นที่ดิสก์อย่างน้อย 5 GB) และรีสตาร์ทเซิร์ฟเวอร์ แชท โมเดล และการตั้งค่าจะยังคงอยู่ ขั้นตอนนี้อาจใช้เวลาหลายนาที",+ confirmDescriptionCpu:+ "การติดตั้งแบบแชทเท่านั้นนี้รันโมเดล GGUF ไม่พบ GPU ที่รองรับในเครื่องนี้ การติดตั้งแบบเต็มจึงเพิ่ม PyTorch สำหรับ CPU ซึ่งเปิดใช้การเทรนบน CPU การเทรนบน CPU ช้ากว่าบน GPU มาก ต้องใช้พื้นที่ดิสก์อย่างน้อย 5 GB และจะรีสตาร์ทเซิร์ฟเวอร์ แชท โมเดล และการตั้งค่าจะยังคงอยู่ อาจใช้เวลาหลายนาที",confirmAction: "อัปเกรด",keywords:"ติดตั้งแบบเต็ม อัปเกรด ประเภทการติดตั้ง แชทเท่านั้น เทรน ปรับแต่งโมเดล ส่งออก วิดีโอ สร้างรูปภาพ full install upgrade install type chat only gguf add training train training fine-tune pytorch torch export video image generation safetensors",@@ -3736,6 +3740,8 @@ export const th = {},studio: {routeTitle: "เทรน",+ cpuTrainingNotice:+ "ไม่พบ GPU การเทรนจึงทำงานบน CPU ซึ่งช้ากว่าการเทรนบน GPU มาก และรองรับเฉพาะโมเดลข้อความ (LoRA หรือ full finetuning)",wizard: {modelTitle: "โมเดล",modelDescription: "เลือกโมเดลและวิธีการเทรน",diff --git a/studio/frontend/src/i18n/locales/tr.ts b/studio/frontend/src/i18n/locales/tr.tsindex 4e7c6759803..32e14267797 100644--- a/studio/frontend/src/i18n/locales/tr.ts+++ b/studio/frontend/src/i18n/locales/tr.ts@@ -2350,10 +2350,14 @@ export const tr = {label: "Kurulum türü",description:"Yalnızca sohbet (GGUF). Tam kurulum; eğitim, dışa aktarma, video, safetensors modelleri ve ek görüntü üretme özellikleri ekler.",+ descriptionCpu:+ "Yalnızca sohbet (GGUF). Desteklenen bir GPU bulunamadı, bu nedenle tam kurulum CPU üzerinde eğitim ekler.",action: "Tam kuruluma yükselt",confirmTitle: "Tam kuruluma yükseltilsin mi?",confirmDescription:"Bu Yalnızca sohbet kurulumu GGUF modellerini çalıştırır. Tam kurulum, bu makinenin GPU'su için PyTorch ekler; bu da eğitimi, dışa aktarmayı, videoyu, safetensors modellerini ve ek görüntü üretme özelliklerini etkinleştirir. Birkaç gigabayt indirir (en az 5 GB disk alanı) ve sunucuyu yeniden başlatır. Sohbetler, modeller ve ayarlar korunur. Bu işlem birkaç dakika sürebilir.",+ confirmDescriptionCpu:+ "Bu Yalnızca sohbet kurulumu GGUF modellerini çalıştırır. Bu makinede desteklenen bir GPU bulunamadı, bu nedenle tam kurulum CPU için PyTorch ekler; bu da CPU üzerinde eğitimi etkinleştirir. CPU üzerinde eğitim, GPU'ya göre çok daha yavaştır. En az 5 GB disk alanı gerektirir ve sunucuyu yeniden başlatır. Sohbetler, modeller ve ayarlar korunur. Bu işlem birkaç dakika sürebilir.",confirmAction: "Yükselt",keywords:"tam kurulum yükselt kurulum türü yalnızca sohbet gguf eğitim eğit ince ayar pytorch torch dışa aktar video görüntü üretme safetensors full install upgrade chat only training fine-tune export image generation",@@ -3906,6 +3910,8 @@ export const tr = {},studio: {routeTitle: "Eğitim",+ cpuTrainingNotice:+ "GPU bulunamadı, bu nedenle eğitim CPU üzerinde çalışır. GPU eğitiminden çok daha yavaştır ve yalnızca metin modellerini destekler (LoRA veya tam ince ayar).",wizard: {modelTitle: "Model",modelDescription: "Model ve eğitim yöntemini seçin",diff --git a/studio/frontend/src/i18n/locales/uk.ts b/studio/frontend/src/i18n/locales/uk.tsindex 74352744fe9..304f464b1dd 100644--- a/studio/frontend/src/i18n/locales/uk.ts+++ b/studio/frontend/src/i18n/locales/uk.ts@@ -2380,10 +2380,14 @@ export const uk = {label: "Тип інсталяції",description:"Лише чат (GGUF). Повна інсталяція додає навчання, експорт, відео, моделі safetensors і додаткові функції генерування зображень.",+ descriptionCpu:+ "Лише чат (GGUF). Підтримуваний GPU не знайдено, тому повна інсталяція додає навчання на CPU.",action: "Перейти на повну інсталяцію",confirmTitle: "Перейти на повну інсталяцію?",confirmDescription:"Ця інсталяція «Лише чат» запускає моделі GGUF. Повна інсталяція додає PyTorch для GPU цього комп’ютера, що вмикає навчання, експорт, відео, моделі safetensors і додаткові функції генерування зображень. Буде завантажено кілька гігабайтів (потрібно щонайменше 5 GB місця на диску), а сервер перезапуститься. Чати, моделі й налаштування зберігаються. Це може тривати кілька хвилин.",+ confirmDescriptionCpu:+ "Ця інсталяція «Лише чат» запускає моделі GGUF. На цьому комп’ютері не знайдено підтримуваного GPU, тому повна інсталяція додає PyTorch для CPU, що вмикає навчання на CPU. Навчання на CPU набагато повільніше, ніж на GPU. Потрібно щонайменше 5 GB місця на диску, а сервер перезапуститься. Чати, моделі й налаштування збережуться. Це може тривати кілька хвилин.",confirmAction: "Оновити",keywords:"повна інсталяція оновлення тип інсталяції лише чат навчання донавчання експорт відео генерування зображень full install upgrade chat only gguf training train fine-tune pytorch torch export video image generation safetensors",@@ -3940,6 +3944,8 @@ export const uk = {},studio: {routeTitle: "Навчання",+ cpuTrainingNotice:+ "GPU не знайдено, тому навчання виконується на CPU. Воно набагато повільніше, ніж на GPU, і підтримує лише текстові моделі (LoRA або повне донавчання).",wizard: {modelTitle: "Модель",modelDescription: "Виберіть модель і метод навчання",diff --git a/studio/frontend/src/i18n/locales/vi.ts b/studio/frontend/src/i18n/locales/vi.tsindex 2e9c076a493..9a0d75ed512 100644--- a/studio/frontend/src/i18n/locales/vi.ts+++ b/studio/frontend/src/i18n/locales/vi.ts@@ -2362,10 +2362,14 @@ export const vi = {label: "Loại cài đặt",description:"Chỉ trò chuyện (GGUF). Bản cài đặt đầy đủ bổ sung huấn luyện, xuất, video, mô hình safetensors và các tính năng tạo ảnh bổ sung.",+ descriptionCpu:+ "Chỉ trò chuyện (GGUF). Không tìm thấy GPU được hỗ trợ, nên bản cài đặt đầy đủ bổ sung huấn luyện trên CPU.",action: "Nâng cấp lên bản cài đặt đầy đủ",confirmTitle: "Nâng cấp lên bản cài đặt đầy đủ?",confirmDescription:"Bản cài đặt Chỉ trò chuyện này chạy các mô hình GGUF. Bản cài đặt đầy đủ bổ sung PyTorch cho GPU của máy này, cho phép huấn luyện, xuất, video, mô hình safetensors và các tính năng tạo ảnh bổ sung. Quá trình này tải xuống vài gigabyte (cần ít nhất 5 GB dung lượng ổ đĩa) và khởi động lại máy chủ. Cuộc trò chuyện, mô hình và cài đặt được giữ nguyên. Quá trình này có thể mất vài phút.",+ confirmDescriptionCpu:+ "Bản cài đặt Chỉ trò chuyện này chạy các mô hình GGUF. Không tìm thấy GPU được hỗ trợ trên máy này, nên bản cài đặt đầy đủ bổ sung PyTorch cho CPU, cho phép huấn luyện trên CPU. Huấn luyện trên CPU chậm hơn nhiều so với trên GPU. Quá trình này cần ít nhất 5 GB dung lượng ổ đĩa và khởi động lại máy chủ. Cuộc trò chuyện, mô hình và cài đặt được giữ nguyên. Quá trình này có thể mất vài phút.",confirmAction: "Nâng cấp",keywords:"cài đặt đầy đủ nâng cấp loại cài đặt chỉ trò chuyện huấn luyện tinh chỉnh xuất tạo ảnh full install upgrade install type chat only gguf add training train fine-tune pytorch torch export video image generation safetensors",@@ -3910,6 +3914,8 @@ export const vi = {},studio: {routeTitle: "Huấn luyện",+ cpuTrainingNotice:+ "Không tìm thấy GPU, nên quá trình huấn luyện chạy trên CPU. Việc này chậm hơn nhiều so với huấn luyện trên GPU và chỉ hỗ trợ mô hình văn bản (LoRA hoặc tinh chỉnh toàn bộ).",wizard: {modelTitle: "Mô hình",modelDescription: "Chọn mô hình và phương pháp huấn luyện",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 4d593829e2a..f65d7f90525 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -2122,10 +2122,14 @@ export const zhCN = {label: "安装类型",description:"仅聊天 (GGUF)。完整安装会添加训练、导出、视频、safetensors 模型和更多图像生成功能。",+ descriptionCpu:+ "仅聊天 (GGUF)。未找到受支持的 GPU,因此完整安装会添加 CPU 训练。",action: "升级到完整安装",confirmTitle: "要升级到完整安装吗?",confirmDescription:"此仅聊天安装运行 GGUF 模型。完整安装会为本机 GPU 添加 PyTorch,从而启用训练、导出、视频、safetensors 模型和更多图像生成功能。它会下载几 GB 数据(至少 5 GB 磁盘空间)并重启服务器。聊天记录、模型和设置会保留。这可能需要几分钟。",+ confirmDescriptionCpu:+ "此仅聊天安装运行 GGUF 模型。本机未找到受支持的 GPU,因此完整安装会添加 CPU 版 PyTorch,从而启用 CPU 训练。CPU 训练比 GPU 训练慢得多。它需要至少 5 GB 磁盘空间并会重启服务器。聊天记录、模型和设置会保留。这可能需要几分钟。",confirmAction: "升级",keywords:"full install upgrade 安装类型 完整安装 升级 仅聊天 chat only gguf add training 训练 微调 train fine-tune pytorch torch 导出 视频 图像生成 safetensors",@@ -3550,6 +3554,8 @@ export const zhCN = {imageTraining: "图像训练",goToImageTraining: "训练图像 LoRA",routeTitle: "训练",+ cpuTrainingNotice:+ "未找到 GPU,因此训练在 CPU 上运行。它比 GPU 训练慢得多,并且仅支持文本模型(LoRA 或完整微调)。",wizard: {modelTitle: "模型",modelDescription: "选择模型和训练方法",diff --git a/studio/frontend/src/i18n/locales/zh-TW.ts b/studio/frontend/src/i18n/locales/zh-TW.tsindex e98669bbb33..e4fc6ec1433 100644--- a/studio/frontend/src/i18n/locales/zh-TW.ts+++ b/studio/frontend/src/i18n/locales/zh-TW.ts@@ -2239,10 +2239,14 @@ export const zhTW = {label: "安裝類型",description:"僅聊天(GGUF)。完整安裝會加入訓練、匯出、影片、safetensors 模型及更多圖片生成功能。",+ descriptionCpu:+ "僅聊天(GGUF)。找不到支援的 GPU,因此完整安裝會加入 CPU 訓練。",action: "升級為完整安裝",confirmTitle: "要升級為完整安裝嗎?",confirmDescription:"此「僅聊天」安裝可執行 GGUF 模型。完整安裝會為這台電腦的 GPU 加入 PyTorch,以啟用訓練、匯出、影片、safetensors 模型及更多圖片生成功能。這會下載數 GB 的資料(至少需要 5 GB 磁碟空間)並重新啟動伺服器。聊天、模型和設定都會保留。此程序可能需要幾分鐘。",+ confirmDescriptionCpu:+ "此「僅聊天」安裝可執行 GGUF 模型。這台電腦找不到支援的 GPU,因此完整安裝會加入 CPU 版的 PyTorch,以啟用 CPU 訓練。CPU 訓練比 GPU 訓練慢得多。這需要至少 5 GB 磁碟空間,並會重新啟動伺服器。聊天、模型和設定都會保留。此程序可能需要幾分鐘。",confirmAction: "升級",keywords:"完整安裝 升級 安裝類型 僅聊天 gguf 加入訓練 訓練 微調 pytorch torch 匯出 影片 圖片生成 safetensors full install upgrade chat only training fine-tune export video image generation",@@ -3711,6 +3715,8 @@ export const zhTW = {},studio: {routeTitle: "訓練",+ cpuTrainingNotice:+ "找不到 GPU,因此訓練會在 CPU 上執行。它比 GPU 訓練慢得多,且僅支援文字模型(LoRA 或完整微調)。",wizard: {modelTitle: "模型",modelDescription: "選取模型與訓練方法",diff --git a/studio/frontend/tests/chat-only-full-install.test.ts b/studio/frontend/tests/chat-only-full-install.test.tsindex 6bb258f5be0..0b64ce59f48 100644--- a/studio/frontend/tests/chat-only-full-install.test.ts+++ b/studio/frontend/tests/chat-only-full-install.test.ts@@ -73,13 +73,25 @@ test("the Chat only confirm copy states the download and does not claim a reinstassert.doesNotMatch(repair.confirmDescriptionChatOnly, /reinstalls/);});+test("the CPU-only Chat only copy offers CPU training and none of the GPU features", () => {+ const full = en.settings.general.fullInstall;+ for (const text of [full.descriptionCpu, full.confirmDescriptionCpu]) {+ assert.match(text, /training on the CPU/);+ for (const gpuOnly of ["export", "video", "safetensors"]) {+ assert.doesNotMatch(text, new RegExp(gpuOnly));+ }+ }+ assert.match(full.confirmDescriptionCpu, /at least 5 GB of disk space/);+ assert.doesNotMatch(full.confirmDescriptionCpu, /reinstall/i);+});+test("the greyed Train row points at the Install type row, not at Danger zone", async () => {const source = await readSrcAsync("components/app-sidebar.tsx");const hint = /const trainDisabledHint: string \| undefined = ([\s\S]*?\n\s*: undefined);/.exec(source);assert.ok(hint, "could not find trainDisabledHint");const forNoTorch = (canRepair: boolean, chatOnlyHint: string | null = null) =>new Function(- "chatOnlyMeasured",+ "trainBlocked","chatOnlyReason","chatOnlyDetail","chatOnlyHint",@@ -98,13 +110,13 @@ test("the greyed Train row opens the full install dialog when the upgrade is offconst row = /train: \{[\s\S]*?\n \},\n/.exec(source);assert.ok(row, "could not find the train nav row");// Clickable (not natively disabled) only while the upgrade is offered, and greyed all the same.- assert.match(row[0], /disabled: chatOnlyMeasured && !fullInstall,/);- assert.match(row[0], /dimmed: chatOnlyMeasured && fullInstall !== null,/);+ assert.match(row[0], /disabled: trainBlocked && !fullInstall,/);+ assert.match(row[0], /dimmed: trainBlocked && fullInstall !== null,/);assert.match(row[0], /setFullInstallOpen\(true\)/);assert.match(row[0], /5 GB/);// Never navigates or preloads Train on a Chat only install.- assert.match(row[0], /if \(chatOnlyMeasured\) \{[\s\S]*?return;\n \}\n navigateFromRow/);- assert.match(row[0], /onIntent: \(\) => \{\n if \(chatOnlyMeasured\) return;/);+ assert.match(row[0], /if \(trainBlocked\) \{[\s\S]*?return;\n \}\n navigateFromRow/);+ assert.match(row[0], /onIntent: \(\) => \{\n if \(trainBlocked\) return;/);assert.match(source, /<FullInstallDialog\s+open=\{fullInstallOpen\}/);assert.match(en.settings.general.fullInstall.confirmDescription, /at least 5 GB of disk space/);});@@ -128,6 +140,11 @@ test("the Train hint and the Export banner both carry an Install Training buttonconst exportPage = await readSrcAsync("features/export/export-page.tsx");const banner = /<AlertTitle>Export unavailable<\/AlertTitle>[\s\S]*?<\/Alert>/.exec(exportPage);assert.ok(banner, "could not find the Export unavailable banner");- assert.match(banner[0], /\{fullInstall && \([\s\S]*?setFullInstallOpen\(true\)[\s\S]*?Install Training/);+ assert.match(banner[0], /\{offerFullInstall && \([\s\S]*?setFullInstallOpen\(true\)[\s\S]*?Install Training/);+ // Without a GPU the full install trains on CPU and still cannot export, so the banner does not offer it.+ assert.match(+ exportPage,+ /const offerFullInstall = canUpgrade && hardware\.exportUnsupportedReason === "no_torch";/,+ );assert.match(exportPage, /<FullInstallDialog\s+open=\{fullInstallOpen\}/);});diff --git a/studio/frontend/tests/chat-only-route-guard.test.ts b/studio/frontend/tests/chat-only-route-guard.test.tsindex 9244c951a14..434ea0ab62a 100644--- a/studio/frontend/tests/chat-only-route-guard.test.ts+++ b/studio/frontend/tests/chat-only-route-guard.test.ts@@ -24,22 +24,29 @@ const declarations = [lift(/function isChatOnlyAllowed\([\s\S]*?\n\}/, "isChatOnlyAllowed"),].join("\n")- .replaceAll("(pathname: string): boolean", "(pathname)");+ .replaceAll("(pathname: string): boolean", "(pathname)")+ .replaceAll("(pathname: string, trainAvailable: boolean): boolean", "(pathname, trainAvailable)");const guard = /if \(\s*isChatOnly\(\) &&([\s\S]*?)\)\s*\{\s*throw redirect/.exec(src);assert.ok(guard, "could not find the chat-only redirect in beforeLoad");const condition = `isChatOnly() &&${guard[1]}`.replaceAll("isChatOnly()", "chatOnly")+ .replaceAll("isTrainUnavailable()", "trainUnavailable").replaceAll("location.pathname", "pathname");assert.ok(!condition.includes("location."), "the guard reads a location this test cannot set");assert.ok(!condition.includes("isChatOnly()"), "the guard reads a verdict this test cannot set");+assert.ok(!/\w+\(\)/.test(condition.replaceAll("Boolean(", "")), "the guard reads a store this test cannot set");-const redirectsToChat = new Function(+const redirectsToChatWith = new Function("pathname","chatOnly","unmeasured",+ "trainUnavailable",`${declarations}\nreturn Boolean(${condition});`,-) as (pathname: string, chatOnly: boolean, unmeasured: boolean) => boolean;+) as (pathname: string, chatOnly: boolean, unmeasured: boolean, trainUnavailable: boolean) => boolean;+// A chat-only host that cannot train either, which is every chat-only reason but a CPU training host.+const redirectsToChat = (pathname: string, chatOnly: boolean, unmeasured: boolean) =>+ redirectsToChatWith(pathname, chatOnly, unmeasured, chatOnly);const measuredChatOnly = (pathname: string) => redirectsToChat(pathname, true, false);@@ -63,6 +70,16 @@ test("a measured chat-only host is still redirected off /studio", () => {assert.equal(measuredChatOnly("/studio/runs"), true);});+// "no_gpu" with PyTorch: Train runs on the CPU backend while chat stays GGUF-only.+test("a measured CPU training host reaches /studio and nothing else that chat-only blocks", () => {+ for (const path of ["/studio", "/studio/runs"]) {+ assert.equal(redirectsToChatWith(path, true, false, false), false, path);+ }+ for (const path of ["/settings", "/studioish"]) {+ assert.equal(redirectsToChatWith(path, true, false, false), true, path);+ }+});+test("an unmeasured verdict still lets both pages wait it out", () => {for (const path of ["/studio", "/studio/runs", "/video"]) {assert.equal(diff --git a/studio/frontend/tests/cpu-training-verdict.test.ts b/studio/frontend/tests/cpu-training-verdict.test.tsnew file mode 100644index 00000000000..8bb139e48b5--- /dev/null+++ b/studio/frontend/tests/cpu-training-verdict.test.ts@@ -0,0 +1,79 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++// A CPU-only host trains on the CPU backend (/api/health cpu_training) while chat stays GGUF-only.++import assert from "node:assert/strict";+import test from "node:test";++import { readSrc, registerBundlerResolver } from "./helpers/kit.ts";++registerBundlerResolver();++const { trainsOnCpu, videoNavHint } = await import(+ "../src/config/hardware-verdict.ts"+);+const { en } = await import("../src/i18n/locales/en.ts");++test("only a no_gpu verdict with cpu_training trains on the CPU", () => {+ assert.equal(trainsOnCpu("no_gpu", true), true);+ assert.equal(trainsOnCpu("no_gpu", false), false);+ // no_torch with cpu_training is a Chat only install: the full install trains on CPU, this one cannot.+ for (const reason of [+ "no_torch",+ "torch_cpu_build",+ "torch_cuda_unavailable",+ "intel_mac",+ null,+ ]) {+ assert.equal(trainsOnCpu(reason, true), false, String(reason));+ }+});++test("a GPU-less Chat only install keeps the Video row's GPU message", () => {+ assert.equal(+ videoNavHint(true, "no_torch", false, true),+ "Video generation needs an NVIDIA or AMD GPU.",+ );+ // A Chat only install on a GPU host gets video from the full install, so its row stays open.+ assert.equal(videoNavHint(true, "no_torch", false, false), undefined);+ assert.equal(videoNavHint(false, "no_torch", false, true), undefined);+});++test("the health verdict carries cpu_training into the platform store", () => {+ const env = readSrc("config/env.ts");+ assert.match(env, /cpu_training\?: boolean;/);+ assert.match(env, /cpuTraining: false,/);+ assert.match(+ env,+ /data\.cpu_training === undefined \? previous\.cpuTraining/,+ );+ assert.match(+ env,+ /isCpuTrainingHost: \(\) => \{[\s\S]*?trainsOnCpu\(state\.chatOnlyReason, state\.cpuTraining\)/,+ );+});++test("every Train entry point reads isTrainUnavailable, not isChatOnly", () => {+ for (const file of [+ "components/app-sidebar.tsx",+ "app/routes/__root.tsx",+ "features/studio/studio-page.tsx",+ "features/settings/tabs/data-tab.tsx",+ ]) {+ assert.match(readSrc(file), /isTrainUnavailable\(\)/, file);+ }+ assert.match(+ readSrc("features/studio/studio-page.tsx"),+ /t\("studio\.cpuTrainingNotice"\)/,+ );+ assert.match(en.studio.cpuTrainingNotice, /runs on the CPU/);+ assert.match(en.studio.cpuTrainingNotice, /text models only/);+});++test("the drafter section stays hidden where the CPU backend trains, as on MLX", () => {+ assert.match(+ readSrc("features/studio/sections/drafter-section.tsx"),+ /if \(!store\.eligible \|\| deviceType === "mac" \|\| trainsOnCpu\) \{\n\s*return null;/,+ );+});diff --git a/studio/frontend/tests/gpu-torch-mismatch.test.ts b/studio/frontend/tests/gpu-torch-mismatch.test.tsindex 6217e329f40..638c41e23fb 100644--- a/studio/frontend/tests/gpu-torch-mismatch.test.ts+++ b/studio/frontend/tests/gpu-torch-mismatch.test.ts@@ -255,7 +255,7 @@ test("the sidebar's Train hint stops doing the same", () => {chatOnlyHint: string | null = null,) =>new Function(- "chatOnlyMeasured",+ "trainBlocked","chatOnlyReason","chatOnlyDetail","chatOnlyHint",@@ -276,10 +276,12 @@ test("the sidebar's Train hint stops doing the same", () => {assert.ok(withoutDetail);assert.doesNotMatch(withoutDetail, /needs an NVIDIA or AMD GPU/);}- assert.equal(- forReason("no_gpu", null),- "Training needs an NVIDIA or AMD GPU.",- );+ // A CPU-only host with PyTorch trains on CPU and never reaches the hint; without PyTorch the+ // GPU is not what is missing either.+ const noGpu = forReason("no_gpu", null);+ assert.ok(noGpu);+ assert.doesNotMatch(noGpu, /needs an NVIDIA or AMD GPU/);+ assert.match(noGpu, /PyTorch/);assert.equal(forReason("detection_failed", null), undefined);});diff --git a/studio/frontend/tests/keyboard-shortcuts.test.ts b/studio/frontend/tests/keyboard-shortcuts.test.tsindex c92498dd0ab..fb928ccf54d 100644--- a/studio/frontend/tests/keyboard-shortcuts.test.ts+++ b/studio/frontend/tests/keyboard-shortcuts.test.ts@@ -327,18 +327,23 @@ test("the workspace chords land where the guard lets them", async () => {SRC__ROOT,/const chatOnlyMeasured = usePlatformStore\(\n\s*\(s\) => s\.isChatOnly\(\) && !s\.capabilitiesUnknown\(\),/,);+ // Train follows its own verdict: a CPU training host is chat-only yet trains.+ assert.match(+ SRC__ROOT,+ /const trainBlocked = usePlatformStore\(\n\s*\(s\) => s\.isTrainUnavailable\(\) && !s\.capabilitiesUnknown\(\),/,+ );assert.match(SRC__ROOT,/const routeShortcutEnabled = !isAuthFlowRoute && !settingsDialogOpen;/,);assert.match(SRC__ROOT,- /useShortcut\("switchToTrain", goTo\("\/studio"\), \{\n\s*enabled: routeShortcutEnabled && !chatOnlyMeasured,/,+ /useShortcut\("switchToTrain", goTo\("\/studio"\), \{\n\s*enabled: routeShortcutEnabled && !trainBlocked,/,);// /video checks only auth, so the chord would land on the unsupported-hardware gate.assert.match(SRC__ROOT,- /const videoDisabled =\n\s*videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn\) !== undefined;/,+ /const videoDisabled =\n\s*videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn, cpuTraining\) !== undefined;/,);assert.match(SRC__ROOT,@@ -346,7 +351,7 @@ test("the workspace chords land where the guard lets them", async () => {);assert.match(APP_SIDEBAR,- /const videoDisabledHint = videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn\);/,+ /const videoDisabledHint = videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn, cpuTraining\);/,);assert.match(APP_SIDEBAR, /disabled: videoDisabled,/);diff --git a/studio/frontend/tests/provisional-hardware-verdict.test.ts b/studio/frontend/tests/provisional-hardware-verdict.test.tsindex 5ceb1c73ed1..700dc5eacac 100644--- a/studio/frontend/tests/provisional-hardware-verdict.test.ts+++ b/studio/frontend/tests/provisional-hardware-verdict.test.ts@@ -390,7 +390,7 @@ test("the Video row is disabled exactly when the hint has something to say", asyconst { readFile } = await import("node:fs/promises");assert.match(APP_SIDEBAR,- /const videoDisabledHint = videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn\)/,+ /const videoDisabledHint = videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn, cpuTraining\)/,"the Video hint no longer comes from the shared derivation",);assert.match(diff --git a/studio/frontend/tests/shortcut-dispatch-guards.test.ts b/studio/frontend/tests/shortcut-dispatch-guards.test.tsindex 24fdb89c9ed..178b96ff208 100644--- a/studio/frontend/tests/shortcut-dispatch-guards.test.ts+++ b/studio/frontend/tests/shortcut-dispatch-guards.test.ts@@ -205,7 +205,7 @@ test("route shortcuts stay idle while Settings is open", async () => {}assert.equal(enabledById.get("switchToTrain"),- "routeShortcutEnabled && !chatOnlyMeasured",+ "routeShortcutEnabled && !trainBlocked",);assert.equal(enabledById.get("switchToVideo"),@@ -464,7 +464,7 @@ test("selection and clipboard chords stop at a covered sidebar", async () => {// resolveNavRowState leaves pending rows enabled, so chords must match their rows.test("the workspace chords wait on the same verdict their rows do", async () => {- assert.match(SRC__ROOT, /enabled: routeShortcutEnabled && !chatOnlyMeasured,/);+ assert.match(SRC__ROOT, /enabled: routeShortcutEnabled && !trainBlocked,/);assert.match(SRC__ROOT, /enabled: routeShortcutEnabled && !videoDisabled,/);const rowState = await readSrcAsync("components/nav-row-state.ts");assert.match(diff --git a/studio/frontend/tests/sidebar-nav-backend-parity.test.ts b/studio/frontend/tests/sidebar-nav-backend-parity.test.tsindex c4a4aed2c4c..7f862b02991 100644--- a/studio/frontend/tests/sidebar-nav-backend-parity.test.ts+++ b/studio/frontend/tests/sidebar-nav-backend-parity.test.ts@@ -66,7 +66,7 @@ test("Train and Video are still the capability-gated rows", async () => {// Video needs its own disabled state; reusing the chat-only verdict un-gates it on MLX-only Macs.for (const [id, disabled] of [// Train stays enabled only to open the full install dialog on an upgradable Chat only install.- ["train", /disabled: chatOnlyMeasured && !fullInstall,/],+ ["train", /disabled: trainBlocked && !fullInstall,/],["video", /disabled: (?!chatOnlyMeasured)\w+,/],] as const) {const body = bodies.get(id);diff --git a/studio/frontend/tests/training-api-snippets.test.ts b/studio/frontend/tests/training-api-snippets.test.tsindex ddcfced85cc..6f07878ac68 100644--- a/studio/frontend/tests/training-api-snippets.test.ts+++ b/studio/frontend/tests/training-api-snippets.test.ts@@ -363,7 +363,11 @@ test("the Train header leads its page links with the API button, which alone opeassert.match(page, /<div className="ml-auto flex items-center gap-2">\s*<TrainingApiButton \/>\s*<MediaPageLink\b[^]*?to="\/library"/);const button = readSrc("features/studio/training-api-button.tsx");assert.match(button, /className=\{HEADER_ICON_BUTTON\}/);- assert.match(button, /buildTrainingStartPayload\(config, null\)/);+ // As Start sends it: the CPU training verdict drops a drafter the hidden section cannot untick.+ assert.match(+ button,+ /buildTrainingStartPayload\(\s*config,\s*null,\s*null,\s*usePlatformStore\.getState\(\)\.isCpuTrainingHost\(\),\s*\)/,+ );assert.match(button, /\.openTrainingApi\(/);const tabs = readSrc("features/settings/components/api-example-tabs.tsx");assert.match(tabs, /"api-keys-training-api": "training"/);diff --git a/studio/frontend/tests/training-start-payload-drafter.test.ts b/studio/frontend/tests/training-start-payload-drafter.test.tsindex 65f73c86dfc..76546e18f80 100644--- a/studio/frontend/tests/training-start-payload-drafter.test.ts+++ b/studio/frontend/tests/training-start-payload-drafter.test.ts@@ -4,7 +4,7 @@import assert from "node:assert/strict";import test from "node:test";-import { registerBundlerResolver } from "./helpers/kit.ts";+import { readSrc, registerBundlerResolver } from "./helpers/kit.ts";import type { DrafterCapability } from "../src/features/training/types/api.ts";import type { TrainingConfigState } from "../src/features/training/types/config.ts";@@ -132,6 +132,59 @@ test("settings the request cannot carry leave the payload exactly as without theassert.equal(Object.hasOwn(text, "drafter"), true);});+// The drafter section is hidden on the CPU backend, so a drafter ticked in a saved config or an+// imported YAML must not reach a start the backend refuses with nothing left to untick it.+test("a saved or imported drafter is not sent on the CPU backend", () => {+ const cpu = { device_backend: "cpu" } as never;+ const saved = migrateTrainingConfig(+ partializeTrainingConfig(+ config({ ...ON, drafterCapability: capability() }) as never,+ ),+ TRAINING_CONFIG_PERSISTENCE_VERSION,+ ) as unknown as TrainingConfigState;+ const imported = drafterStateFrom(+ parseYamlConfig(serializeConfigToYaml(config({ ...ON }), false)).training+ ?.drafter,+ );+ for (const restored of [config(saved), config({ ...imported })]) {+ assert.equal(restored.drafterEnabled, true);+ const payload = buildTrainingStartPayload(restored, null, cpu);+ assert.equal(Object.hasOwn(payload, "drafter"), false);+ // The same state still carries it where the backend trains drafters.+ const cuda = buildTrainingStartPayload(restored, null, {+ device_backend: "cuda",+ } as never);+ assert.equal(Object.hasOwn(cuda, "drafter"), true);+ }+});++// /api/system can still be pending or have failed at Start; the health verdict that hides the+// drafter section has settled by then, so it alone must keep the drafter out of the request.+test("the CPU verdict drops a saved drafter without system info, and only there", () => {+ const saved = config({ ...ON, drafterCapability: capability() });+ const cpu = buildTrainingStartPayload(saved, null, null, true);+ assert.equal(Object.hasOwn(cpu, "drafter"), false);+ const gpu = buildTrainingStartPayload(saved, null, null, false);+ assert.equal(Object.hasOwn(gpu, "drafter"), true);+ assert.equal(gpu.drafter?.enabled, true);+});++test("Start and the API example pass the CPU verdict the drafter section reads", () => {+ const start = readSrc("features/training/lib/start-fresh-training-run.ts");+ assert.match(+ start,+ /buildTrainingStartPayload\(\s*attempt\.config,\s*hfToken,\s*getCachedSystemInfo\(\),\s*usePlatformStore\.getState\(\)\.isCpuTrainingHost\(\),\s*\)/,+ );+ assert.match(+ readSrc("features/studio/training-api-button.tsx"),+ /usePlatformStore\.getState\(\)\.isCpuTrainingHost\(\)/,+ );+ assert.match(+ readSrc("features/studio/sections/drafter-section.tsx"),+ /usePlatformStore\(\(state\) => state\.isCpuTrainingHost\(\)\)/,+ );+});+test("an enabled drafter on a supported model adds only the drafter block", () => {const off = buildTrainingStartPayload(config(), null);const on = buildTrainingStartPayload(diff --git a/studio/frontend/tests/video-cpu-developer-mode.test.ts b/studio/frontend/tests/video-cpu-developer-mode.test.tsindex 54353ec53d2..145f4cf5caf 100644--- a/studio/frontend/tests/video-cpu-developer-mode.test.ts+++ b/studio/frontend/tests/video-cpu-developer-mode.test.ts@@ -103,7 +103,7 @@ test("the health verdict carries the opt-in into the platform store", () => {for (const file of ["components/app-sidebar.tsx", "app/routes/__root.tsx"]) {assert.match(readSrc(file),- /videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn\)/,+ /videoNavHint\(chatOnlyMeasured, chatOnlyReason, videoCpuOptIn, cpuTraining\)/,file,);}diff --git a/tests/studio/test_hf_token_validation_tick_contract.py b/tests/studio/test_hf_token_validation_tick_contract.pyindex 2e02014a714..f0fed719956 100644--- a/tests/studio/test_hf_token_validation_tick_contract.py+++ b/tests/studio/test_hf_token_validation_tick_contract.py@@ -160,9 +160,9 @@ def test_training_start_prepares_token_once_before_transport():"async function checkSelectedDataset", 1)[0]assert "await prepareHfTokenForUse(attempt.hfToken)" in prepare_attempt- assert (- "buildTrainingStartPayload(attempt.config, hfToken, getCachedSystemInfo())"- in submit_attempt+ assert re.search(+ r"buildTrainingStartPayload\(\s*attempt\.config,\s*hfToken,\s*getCachedSystemInfo\(\)",+ submit_attempt,)assert "payload.hf_token = hfToken" not in submit_attemptassert submit_attempt.index("attempt.enterTransport()") < submit_attempt.index(diff --git a/tests/test_cpu_backend_init.py b/tests/test_cpu_backend_init.pyindex d5ccaa4abd0..0d2f784bb03 100644--- a/tests/test_cpu_backend_init.py+++ b/tests/test_cpu_backend_init.py@@ -245,9 +245,10 @@ def test_cpu_backend_query_only_reads_an_already_imported_zoo(monkeypatch):@pytest.mark.parametrize("entry", ["studio/backend/main.py", "studio/backend/run.py"])-def test_studio_keeps_training_off_on_cpu_only_hosts(entry):- """Studio / Desktop stay chat-only without a GPU: both entry points opt out of the CPU training backend- at module level, before anything can import unsloth, and spawned training workers inherit it."""+def test_studio_processes_opt_out_of_the_cpu_backend_by_default(entry):+ """Both Studio entry points opt out of the CPU training backend at module level, before anything can+ import unsloth, and spawned workers inherit it. Only a training worker on a host Studio itself trains on+ CPU opts back in (studio/backend/core/training/worker.py sets UNSLOTH_FORCE_CPU=1)."""tree = ast.parse((_ROOT / entry).read_text(encoding = "utf-8"))opt_out = first_unsloth_import = Nonefor node in tree.body: