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: declare UNSLOTH_IS_PRESENT at backend startup (#6262)
Daniel Hanb91116cacc1c
diff --git a/studio/backend/main.py b/studio/backend/main.pyindex 2b34b11fef6..064e2617534 100644--- a/studio/backend/main.py+++ b/studio/backend/main.py@@ -193,6 +193,11 @@ if _STUDIO_ROOT_RESOLVED != _LEGACY_STUDIO_ROOT:if not os.environ.get("UNSLOTH_LLAMA_CPP_PATH"):os.environ["UNSLOTH_LLAMA_CPP_PATH"] = str(_STUDIO_ROOT_RESOLVED / "llama.cpp")+# The studio bundles unsloth_zoo; declare unsloth present (as `import unsloth`+# does) so its lazy submodule imports (export, hardware, mlx) and the+# DiffusionGemma runner never trip the install guard on a clean install.+os.environ.setdefault("UNSLOTH_IS_PRESENT", "1")+import hashlibimport mimetypesimport re as _rediff --git a/studio/backend/run.py b/studio/backend/run.pyindex a883154c4a3..a8e9a46a66d 100644--- a/studio/backend/run.py+++ b/studio/backend/run.py@@ -545,6 +545,11 @@ if _STUDIO_ROOT_RESOLVED != _LEGACY_STUDIO_ROOT:if not os.environ.get("UNSLOTH_LLAMA_CPP_PATH"):os.environ["UNSLOTH_LLAMA_CPP_PATH"] = str(_STUDIO_ROOT_RESOLVED / "llama.cpp")+# The studio bundles unsloth_zoo; declare unsloth present (as `import unsloth`+# does) so its lazy submodule imports (export, hardware, mlx) and the+# DiffusionGemma runner never trip the install guard on a clean install.+os.environ.setdefault("UNSLOTH_IS_PRESENT", "1")+def _write_pid_file():"""Write the current process PID to the studio PID file."""