From 66c88ea137106c1522b6d28c31ee5cd0414e75f5 Mon Sep 17 00:00:00 2001 From: asagi4 <130366179+asagi4@users.noreply.github.com> Date: Sat, 5 Sep 2026 15:36:13 +0300 Subject: [PATCH] Warn user if LoRA search is ambiguous --- prompt_control/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prompt_control/utils.py b/prompt_control/utils.py index b1fe21d..bc555e4 100644 --- a/prompt_control/utils.py +++ b/prompt_control/utils.py @@ -275,6 +275,10 @@ def lora_name_to_file(name: str) -> str | None: search = [f for f in filenames if all(p in f for p in parts)] if len(search) == 1: return search[0] + elif len(search) > 1: + if len(search) > 4: + search[4] = "..." + log.warning("Ignored LoRA search 's%'; matched more than one file: %s", name, ", ".join(search[:5])) return None