Centralize negative prompt hygiene
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user