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: startup loading banner and mute the benign bitsandbytes ROCm warning (#7085)
Daniel Han2a22da9fd7cc
diff --git a/studio/backend/core/training/worker.py b/studio/backend/core/training/worker.pyindex 5fb8fc2bb65..130e6ece642 100644--- a/studio/backend/core/training/worker.py+++ b/studio/backend/core/training/worker.py@@ -2579,6 +2579,15 @@ def run_training_process(*, event_queue: Any, stop_queue: Any, config: dict) ->_bnb_rocm_ver,)+ # Setting BNB_ROCM_VERSION makes bitsandbytes log a benign override+ # notice on import; drop only that record so real errors and mismatch+ # warnings still show.+ if os.environ.get("BNB_ROCM_VERSION"):+ import logging as _logging+ _logging.getLogger("bitsandbytes.cextension").addFilter(+ lambda _r: "environment variable detected" not in _r.getMessage()+ )+# Parse HIP version for the kernel-fix gate below, falling back to# the rocm version embedded in torch.__version__ when version.hip is# unset (AMD SDK / Radeon wheels).diff --git a/studio/backend/main.py b/studio/backend/main.pyindex 8762c431958..332f4e7d1ff 100644--- a/studio/backend/main.py+++ b/studio/backend/main.py@@ -159,6 +159,14 @@ if sys.platform == "win32":_bnb_rocm_ver_final,)+ # Setting BNB_ROCM_VERSION makes bitsandbytes log a benign override notice on+ # import; drop only that record so real errors and mismatch warnings show.+ if os.environ.get("BNB_ROCM_VERSION"):+ import logging as _logging+ _logging.getLogger("bitsandbytes.cextension").addFilter(+ lambda _r: "environment variable detected" not in _r.getMessage()+ )+# ── WSL AMD Strix Halo (gfx1151): enable ROCDXG before any torch import ──────# In WSL the AMD GPU is reached via the ROCDXG bridge (librocdxg.so over# /dev/dxg), which HSA loads only when HSA_ENABLE_DXG_DETECTION=1 is set BEFOREdiff --git a/studio/backend/run.py b/studio/backend/run.pyindex 2cc6c4a93e3..3efeac960e7 100644--- a/studio/backend/run.py+++ b/studio/backend/run.py@@ -1156,6 +1156,15 @@ def run_server(from threading import Thread, Eventimport uvicorn+ # `from main import app` below loads torch/unsloth/transformers (~2 min cold,+ # silent), so print a flushed heads-up (piped stdout is block-buffered).+ if not silent:+ print(+ "Loading Unsloth Studio, please wait... (this can take a few minutes)",+ flush = True,+ )+ print(" - loading PyTorch, Unsloth and Transformers...", flush = True)+import_started = time.perf_counter()from main import app, setup_frontend, _IS_COLAB@@ -1164,6 +1173,8 @@ def run_server("Imported FastAPI app in %.1fms",(time.perf_counter() - import_started) * 1000,)+ if not silent:+ print(" - Starting server...", flush = True)from utils.paths import ensure_studio_directories# Allow local stdio MCP servers on a loopback bind (the user's own machine),