From e948a9601c070f4a3fccacedbd3abd7eb2aeddd3 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 07:32:11 +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 | 5 +---- studio/backend/main.py | 1 + studio/backend/routes/inference.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/studio/backend/core/inference/diffusion.py b/studio/backend/core/inference/diffusion.py index ca3c3d917b..fd06cbe704 100644 --- a/studio/backend/core/inference/diffusion.py +++ b/studio/backend/core/inference/diffusion.py @@ -384,10 +384,7 @@ def detect_family( term_compact = re.sub(r"[^a-z0-9]+", "", term.lower()) if not term_compact: return False - return ( - term_compact in needle_compact_tokens - or term_compact == needle_compact - ) + return term_compact in needle_compact_tokens or term_compact == needle_compact # Scan _FAMILIES first (GGUF-supported), then _FULL_REPO_FAMILIES # so a repo like ``stabilityai/stable-diffusion-xl-base-1.0`` is diff --git a/studio/backend/main.py b/studio/backend/main.py index ad727e0998..ac98722f46 100644 --- a/studio/backend/main.py +++ b/studio/backend/main.py @@ -330,6 +330,7 @@ async def _validation_error_scrubbing_handler(request, exc): content = {"detail": _scrub_validation_obj(exc.errors())}, ) + # Initialize structured logging from loggers.config import LogConfig from loggers.handlers import LoggingMiddleware diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index 8e021d7813..f799f8df58 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -394,9 +394,7 @@ async def _release_llama_for(workload: str) -> None: try: await asyncio.to_thread(llama.unload_model) except Exception as exc: - logger.warning( - "Failed to unload GGUF chat before %s load: %s", workload, exc - ) + logger.warning("Failed to unload GGUF chat before %s load: %s", workload, exc) raise HTTPException( status_code = 503, detail = (