From c520a473aed06cebca729204ff5439b78e3f37f1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 09:46:13 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/core/inference/diffusion.py | 4 +++- studio/backend/routes/inference.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/studio/backend/core/inference/diffusion.py b/studio/backend/core/inference/diffusion.py index fe50588b61..20d67a9cf3 100644 --- a/studio/backend/core/inference/diffusion.py +++ b/studio/backend/core/inference/diffusion.py @@ -1506,7 +1506,9 @@ def _release_chat_backend_for_diffusion() -> None: # owned names. Catches races where a name we did not explicitly # unload (because it appeared in loading_models between the # snapshot and the unload calls) is still owned after the loop. - remaining_loading = set(getattr(backend, "loading_models", set()) or set()) & owned_names + remaining_loading = ( + set(getattr(backend, "loading_models", set()) or set()) & owned_names + ) remaining_active = getattr(backend, "active_model_name", None) if remaining_loading or (remaining_active in owned_names): raise RuntimeError( diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index b20e7e3696..7d18972a91 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -506,7 +506,9 @@ async def _release_safetensors_chat_for(workload: str) -> None: # initially present. Catches races where a model name we did not # explicitly unload (because it appeared between the snapshot and # the unload calls) is still in the owned set after the loop. - remaining_loading = set(getattr(inf, "loading_models", set()) or set()) & owned_names + remaining_loading = ( + set(getattr(inf, "loading_models", set()) or set()) & owned_names + ) remaining_active = getattr(inf, "active_model_name", None) if remaining_loading or (remaining_active in owned_names): raise HTTPException(