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
Match the LM Studio GGUF suffix case insensitively (#8100)
Daniel Han805d54af7d65
diff --git a/studio/backend/hub/services/models/local_inventory.py b/studio/backend/hub/services/models/local_inventory.pyindex 8362cc76bc4..a5911de10d4 100644--- a/studio/backend/hub/services/models/local_inventory.py+++ b/studio/backend/hub/services/models/local_inventory.py@@ -369,7 +369,7 @@ def _scan_lmstudio_dir(lm_dir: Path, *, entry_limit: int | None = None) -> List[breaktry:if not child.is_dir():- if child.suffix == ".gguf" and child.is_file():+ if child.suffix.lower() == ".gguf" and child.is_file():try:updated_at = child.stat().st_mtimeexcept OSError:@@ -422,7 +422,7 @@ def _scan_lmstudio_dir(lm_dir: Path, *, entry_limit: int | None = None) -> List[updated_at = updated_at,))- elif model_dir.suffix == ".gguf" and model_dir.is_file():+ elif model_dir.suffix.lower() == ".gguf" and model_dir.is_file():try:updated_at = model_dir.stat().st_mtimeexcept OSError:diff --git a/studio/backend/hub/tests/test_model_services.py b/studio/backend/hub/tests/test_model_services.pyindex c59480dce11..5b61a67f844 100644--- a/studio/backend/hub/tests/test_model_services.py+++ b/studio/backend/hub/tests/test_model_services.py@@ -4465,3 +4465,19 @@ def test_dataset_status_includes_generation(monkeypatch):assert result.state == "running"assert result.generation == 4++[email protected]("layout", ["flat", "publisher_child"])+def test_lmstudio_scan_matches_gguf_suffix_case_insensitively(tmp_path, layout):+ """The custom and models-dir scans lower() the suffix; these two did not, so a+ .GGUF was invisible only here. Windows and macOS treat the two spellings as one+ name, so the file is reachable but unlisted."""+ lm_dir = tmp_path / "models"+ holder = lm_dir if layout == "flat" else lm_dir / "publisher"+ holder.mkdir(parents = True)+ for name in ("lower.gguf", "UPPER.GGUF", "Mixed.GguF"):+ (holder / name).write_bytes(b"x")++ found = {Path(row.path).name for row in local_inventory._scan_lmstudio_dir(lm_dir)}++ assert found == {"lower.gguf", "UPPER.GGUF", "Mixed.GguF"}