Preserve hyphenated SDXL tags
This commit is contained in:
+1
-1
@@ -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(" .")]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user