Centralize negative prompt hygiene

This commit is contained in:
2026-06-27 14:01:10 +02:00
parent 333fa5eae6
commit 4fdef3875b
7 changed files with 38 additions and 9 deletions
+5
View File
@@ -167,3 +167,8 @@ def sanitize_tag_prompt(value: Any, triggers: Iterable[str] = ()) -> str:
def sanitize_negative_text(value: Any) -> str:
return dedupe_comma_list(value)
def combine_negative_text(*parts: Any) -> str:
cleaned = [clean_spacing(part).strip(" ,.;") for part in parts if clean_spacing(part).strip(" ,.;")]
return sanitize_negative_text(", ".join(cleaned))