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 = (