Split SDXL sentence-boundary tags
This commit is contained in:
@@ -63,6 +63,7 @@ def split_tag_text(text: Any) -> list[str]:
|
||||
text,
|
||||
flags=re.IGNORECASE,
|
||||
)
|
||||
text = re.sub(r"(?<=[A-Za-z0-9)])\.\s+(?=[A-Za-z])", ", ", text)
|
||||
text = re.sub(r"(?<!-)\b(?:and|with)\b(?!-)", ",", text, flags=re.IGNORECASE)
|
||||
text = re.sub(r"\b(woman|man),\s+(woman|man)\s+are\b", r"\1 and \2 are", text, flags=re.IGNORECASE)
|
||||
parts = re.split(r"\s*[,;]\s*", text)
|
||||
|
||||
Reference in New Issue
Block a user