[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
c20ed25ec6
commit
c520a473ae
2 changed files with 6 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue