From ff98c6d160d9309043f43a330b9b3082bd38fd44 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 05:57:48 +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/core/inference/llama_cpp.py | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/studio/backend/core/inference/diffusion.py b/studio/backend/core/inference/diffusion.py index 335e93c957..f000ef20cf 100644 --- a/studio/backend/core/inference/diffusion.py +++ b/studio/backend/core/inference/diffusion.py @@ -200,9 +200,7 @@ def _resolve_local_gguf_child(repo_root: Path, gguf_filename: str) -> Path: invariant for Hub repos. """ if Path(gguf_filename).is_absolute() or "\\" in gguf_filename: - raise RuntimeError( - "gguf_filename must be a relative file path inside repo_id." - ) + raise RuntimeError("gguf_filename must be a relative file path inside repo_id.") rel = PurePosixPath(gguf_filename) if any(part in ("", ".", "..") for part in rel.parts): raise RuntimeError( diff --git a/studio/backend/core/inference/llama_cpp.py b/studio/backend/core/inference/llama_cpp.py index 57cda178a9..51da54789d 100644 --- a/studio/backend/core/inference/llama_cpp.py +++ b/studio/backend/core/inference/llama_cpp.py @@ -2721,14 +2721,10 @@ class LlamaCppBackend: ) elif gguf_path: if not Path(gguf_path).is_file(): - raise FileNotFoundError( - f"GGUF file not found: {gguf_path}" - ) + raise FileNotFoundError(f"GGUF file not found: {gguf_path}") model_path = gguf_path else: - raise ValueError( - "Either gguf_path or hf_repo must be provided" - ) + raise ValueError("Either gguf_path or hf_repo must be provided") finally: self._loading_model_identifier = None