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 #14821 and #14886 (#14885)

Daniel Hane34ef59e29e3
diff --git a/studio/backend/tests/test_diffusion_learned_peaks.py b/studio/backend/tests/test_diffusion_learned_peaks.py
index 6e8b4ef8a36..75cc8543c81 100644
--- a/studio/backend/tests/test_diffusion_learned_peaks.py
+++ b/studio/backend/tests/test_diffusion_learned_peaks.py
@@ -1418,7 +1418,9 @@ def test_the_setup_oom_retry_frees_what_the_failed_setup_allocated(monkeypatch):
assert policy == dm.OFFLOAD_GROUP and dm.applied_plan(pipe, plan).estimates["setup_oom_retry"]
assert alive_at_retry == [False]
assert scratch_refs[0]() is None
- assert getattr(pipe, dm._GROUP_OFFLOAD_FAILURE_ATTR, None) is None # cleared once the retry took over
+ assert (
+ getattr(pipe, dm._GROUP_OFFLOAD_FAILURE_ATTR, None) is None
+ ) # cleared once the retry took over
def test_a_stored_setup_failure_keeps_its_kind_but_not_its_traceback():
diff --git a/tests/test_fp8_scale_dequant_one_pass.py b/tests/test_fp8_scale_dequant_one_pass.py
index 36012b88c47..4b479b987f5 100644
--- a/tests/test_fp8_scale_dequant_one_pass.py
+++ b/tests/test_fp8_scale_dequant_one_pass.py
@@ -35,7 +35,12 @@ def _reference(x, s, dtype):
return x.to(dtype) * s.to(dtype)
-def _weight(m, n, scale_dtype = torch.float32, seed = 0):
+def _weight(
+ m,
+ n,
+ scale_dtype = torch.float32,
+ seed = 0,
+):
g = torch.Generator(device = "cuda").manual_seed(seed)
w = torch.randn(m, n, device = "cuda", generator = g)
w = w * torch.logspace(-6, 2, m, device = "cuda")[:, None]