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.

Format two files merged without the repo formatter in #14834 and #14819 (#14878)

Daniel Han7ca9ad85c4d1
diff --git a/studio/backend/tests/test_diffusion_prequant_cache.py b/studio/backend/tests/test_diffusion_prequant_cache.py
index 6539ee8aa69..b6644b941c9 100644
--- a/studio/backend/tests/test_diffusion_prequant_cache.py
+++ b/studio/backend/tests/test_diffusion_prequant_cache.py
@@ -1076,7 +1076,12 @@ def test_hub_coords_of_legacy_and_copied_snapshots_keep_their_names(tmp_path):
base.mkdir(parents = True)
(base / "diffusion_pytorch_model.safetensors").write_bytes(b"weights")
link, blob = _hub_snapshot(tmp_path, tmp_path / "base")
- assert C._hub_coords(link) == ("org/tiny", "transformer/diffusion_pytorch_model.safetensors", blob, "c" * 40)
+ assert C._hub_coords(link) == (
+ "org/tiny",
+ "transformer/diffusion_pytorch_model.safetensors",
+ blob,
+ "c" * 40,
+ )
copy = _copy_snapshot(tmp_path, tmp_path / "base")
assert C._hub_coords(copy)[2] == "diffusion_pytorch_model.safetensors"
diff --git a/studio/install_python_stack.py b/studio/install_python_stack.py
index 71e8d2f577b..91a53c5ef3f 100644
--- a/studio/install_python_stack.py
+++ b/studio/install_python_stack.py
@@ -10634,7 +10634,9 @@ def _desktop_unsloth_spec(package_name: str) -> "tuple[str, str]":
if found.get("unsloth"):
# The zoo it resolved against as a floor: the no-torch install is --no-deps, so a bare
# unsloth-zoo under UV_RESOLUTION=lowest could pick one below unsloth's own zoo floor.
- return spec, (f"unsloth-zoo>={found['unsloth-zoo']}" if found.get("unsloth-zoo") else zoo_spec)
+ return spec, (
+ f"unsloth-zoo>={found['unsloth-zoo']}" if found.get("unsloth-zoo") else zoo_spec
+ )
requested_present = newest(spec) is not None
# The newest zoo, then the newest unsloth not above it (an unsloth never needs a newer zoo).
zoo = newest(zoo_spec, "unsloth-zoo")