Preserve hyphenated SDXL tags

This commit is contained in:
2026-06-27 22:14:20 +02:00
parent c74798d80f
commit 15b28b422f
3 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ def split_tag_text(text: Any) -> list[str]:
text,
flags=re.IGNORECASE,
)
text = re.sub(r"\b(?:and|with)\b", ",", text, flags=re.IGNORECASE)
text = re.sub(r"(?<!-)\b(?:and|with)\b(?!-)", ",", text, flags=re.IGNORECASE)
parts = re.split(r"\s*[,;]\s*", text)
return [clean(part).strip(" .") for part in parts if clean(part).strip(" .")]