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