diff --git a/studio/backend/core/inference/sd_cpp_backend.py b/studio/backend/core/inference/sd_cpp_backend.py index fd56c7ed86..09d144f58e 100644 --- a/studio/backend/core/inference/sd_cpp_backend.py +++ b/studio/backend/core/inference/sd_cpp_backend.py @@ -700,9 +700,7 @@ class SdCppDiffusionBackend: # Same per-variant encoder selection as _asset_specs, keyed on the loaded repo id, so the # cache-deletion guard protects the encoder repo this load actually downloaded (the 9B # variant's Qwen3-8B, not the 4B default). - repos.extend( - terepo for terepo, _f, _k in sd_cpp_text_encoders_for(fam, state.repo_id) - ) + repos.extend(terepo for terepo, _f, _k in sd_cpp_text_encoders_for(fam, state.repo_id)) return tuple(dict.fromkeys(r for r in repos if r)) # ── Generate ─────────────────────────────────────────────────────────── diff --git a/studio/backend/tests/test_diffusion_lora_trainer.py b/studio/backend/tests/test_diffusion_lora_trainer.py index d96c06641e..eeca048655 100644 --- a/studio/backend/tests/test_diffusion_lora_trainer.py +++ b/studio/backend/tests/test_diffusion_lora_trainer.py @@ -108,7 +108,7 @@ def test_discover_tolerates_non_object_and_invalid_utf8_jsonl(tmp_path): # must be skipped per-line rather than crash the trainer in .get(); a valid row still resolves. _touch(tmp_path / "x.png") (tmp_path / "metadata.jsonl").write_text( - "[]\nnull\n\"str\"\n123\n{not json\n" + '[]\nnull\n"str"\n123\n{not json\n' + json.dumps({"file_name": "x.png", "text": "hi"}) + "\n", encoding = "utf-8", diff --git a/studio/backend/tests/test_diffusion_training.py b/studio/backend/tests/test_diffusion_training.py index c61eba3de5..22003af1ee 100644 --- a/studio/backend/tests/test_diffusion_training.py +++ b/studio/backend/tests/test_diffusion_training.py @@ -1045,9 +1045,7 @@ def test_diffusion_info_tolerates_non_object_jsonl(client, dataset_roots): b"null\n" b'"just a string"\n' b"123\n" - b"{not json\n" - + json.dumps({"file_name": "a.png", "text": "cap a"}).encode("utf-8") - + b"\n" + b"{not json\n" + json.dumps({"file_name": "a.png", "text": "cap a"}).encode("utf-8") + b"\n" ) r = client.get("/api/train/diffusion/info") assert r.status_code == 200, r.text @@ -1082,9 +1080,7 @@ def test_diffusion_dataset_mutations_blocked_while_training_active(client, datas files = [("files", ("b.png", b"x", "image/png"))], ) assert up.status_code == 409, up.text - cap = client.put( - "/api/train/diffusion/dataset/locked/caption/a.png", json = {"caption": "hi"} - ) + cap = client.put("/api/train/diffusion/dataset/locked/caption/a.png", json = {"caption": "hi"}) assert cap.status_code == 409, cap.text dele = client.delete("/api/train/diffusion/dataset/locked/image/a.png") assert dele.status_code == 409, dele.text