Skip to content

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.

MLX diffusion backend: decode the sysctl chip name as UTF-8 (#13430)

Daniel Han465aef844c80
diff --git a/studio/backend/core/inference/mlx_diffusion_backend.py b/studio/backend/core/inference/mlx_diffusion_backend.py
index 7e229a5a610..36b260a6ddb 100644
--- a/studio/backend/core/inference/mlx_diffusion_backend.py
+++ b/studio/backend/core/inference/mlx_diffusion_backend.py
@@ -138,6 +138,8 @@ def _chip_name() -> str:
["sysctl", "-n", "machdep.cpu.brand_string"],
capture_output = True,
text = True,
+ encoding = "utf-8",
+ errors = "replace",
timeout = 5,
)
return (out.stdout or "").strip()
@@ -360,7 +362,9 @@ def _holds_base_components(snapshot: str) -> bool:
root = Path(snapshot)
if not all((root / sub).is_dir() for sub in _LINKED_SUBDIRS):
return False
- if not all((root / "tokenizer" / f).is_file() for f in ("tokenizer.json", "tokenizer_config.json")):
+ if not all(
+ (root / "tokenizer" / f).is_file() for f in ("tokenizer.json", "tokenizer_config.json")
+ ):
return False
for sub in ("text_encoder", "vae"):
folder = root / sub