From 061de08f861809d80d0f300ea76c2499355f0131 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2026 07:40: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/llama_cpp.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/studio/backend/core/inference/llama_cpp.py b/studio/backend/core/inference/llama_cpp.py index 94beefa3aa..a57c160a8e 100644 --- a/studio/backend/core/inference/llama_cpp.py +++ b/studio/backend/core/inference/llama_cpp.py @@ -308,8 +308,7 @@ class LlamaCppBackend: files = list_repo_files(hf_repo, token = hf_token) gguf_files = [ - f for f in files - if f.endswith(".gguf") and "mmproj" not in f.lower() + f for f in files if f.endswith(".gguf") and "mmproj" not in f.lower() ] if not gguf_files: return None @@ -528,13 +527,16 @@ class LlamaCppBackend: gguf_filename = fallback_file # Re-discover shards for the fallback variant import re as _re + _shard_pat = _re.compile(r"^(.*)-\d{5}-of-\d{5}\.gguf$") _m = _shard_pat.match(gguf_filename) _prefix = _m.group(1) if _m else None if _prefix: gguf_extra_shards = sorted( - f for f in all_gguf_files - if f.startswith(_prefix) and f != gguf_filename + f + for f in all_gguf_files + if f.startswith(_prefix) + and f != gguf_filename and "mmproj" not in f.lower() ) else: