diff --git a/studio/backend/hub/utils/inventory_scan.py b/studio/backend/hub/utils/inventory_scan.py index 749583f2d0..305f7706c6 100644 --- a/studio/backend/hub/utils/inventory_scan.py +++ b/studio/backend/hub/utils/inventory_scan.py @@ -477,7 +477,8 @@ def _current_revisions(repo_info): latest = latest_snapshot_dir(Path(repo_path)) if latest is not None: scoped = [ - rev for rev in revisions + rev + for rev in revisions if getattr(rev, "snapshot_path", None) is not None and Path(rev.snapshot_path) == latest ] diff --git a/studio/backend/tests/test_cached_gguf_routes.py b/studio/backend/tests/test_cached_gguf_routes.py index 10055c81f7..260523a490 100644 --- a/studio/backend/tests/test_cached_gguf_routes.py +++ b/studio/backend/tests/test_cached_gguf_routes.py @@ -1679,9 +1679,7 @@ def test_pipeline_scans_read_the_snapshot_the_loader_will_open(tmp_path): return SimpleNamespace( snapshot_path = snap, last_modified = float(snap.stat().st_mtime), - files = [ - SimpleNamespace(file_name = Path(f).name, file_path = snap / f) for f in files - ], + files = [SimpleNamespace(file_name = Path(f).name, file_path = snap / f) for f in files], ) info = SimpleNamespace( diff --git a/studio/backend/tests/test_diffusion_backend.py b/studio/backend/tests/test_diffusion_backend.py index 7c9287f746..5f06455a2c 100644 --- a/studio/backend/tests/test_diffusion_backend.py +++ b/studio/backend/tests/test_diffusion_backend.py @@ -3998,7 +3998,9 @@ def test_unload_fences_queued_generations_while_it_waits(fake_runtime, tmp_path) (tmp_path / "model.gguf").write_bytes(b"weights") backend = DiffusionBackend() backend.load_pipeline( - str(tmp_path), gguf_filename = "model.gguf", base_repo = "base/repo", + str(tmp_path), + gguf_filename = "model.gguf", + base_repo = "base/repo", family_override = "z-image", ) @@ -4014,7 +4016,7 @@ def test_unload_fences_queued_generations_while_it_waits(fake_runtime, tmp_path) backend._unload_locked = _record_then_unload backend.unload() - assert seen == [1] # the fence was up for the whole wait + assert seen == [1] # the fence was up for the whole wait assert backend._teardown_waiters == 0 # and released once the pipeline was gone @@ -4024,7 +4026,9 @@ def test_generation_refuses_while_a_teardown_is_waiting(fake_runtime, tmp_path): (tmp_path / "model.gguf").write_bytes(b"weights") backend = DiffusionBackend() backend.load_pipeline( - str(tmp_path), gguf_filename = "model.gguf", base_repo = "base/repo", + str(tmp_path), + gguf_filename = "model.gguf", + base_repo = "base/repo", family_override = "z-image", ) assert backend.generate(prompt = "before", steps = 2)["images"] @@ -4045,7 +4049,9 @@ def test_a_superseding_load_fences_queued_generations_too(fake_runtime, tmp_path (tmp_path / "model.gguf").write_bytes(b"weights") backend = DiffusionBackend() backend.load_pipeline( - str(tmp_path), gguf_filename = "model.gguf", base_repo = "base/repo", + str(tmp_path), + gguf_filename = "model.gguf", + base_repo = "base/repo", family_override = "z-image", ) @@ -4058,7 +4064,9 @@ def test_a_superseding_load_fences_queued_generations_too(fake_runtime, tmp_path backend._unload_locked = _record_then_unload backend.load_pipeline( - str(tmp_path), gguf_filename = "model.gguf", base_repo = "base/repo", + str(tmp_path), + gguf_filename = "model.gguf", + base_repo = "base/repo", family_override = "z-image", )