Split SDXL sentence-boundary tags

This commit is contained in:
2026-06-27 22:23:49 +02:00
parent 842d3580f5
commit 030a1255e1
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -4683,6 +4683,14 @@ def smoke_sdxl_tag_policy() -> None:
subject_pair_tags = sdxl_tag_policy.split_tag_text("Woman A, Man A are mid-transition with hands on hips")
_expect("woman and man are mid-transition" in subject_pair_tags, "SDXL tag splitter broke paired character clause")
_expect("woman" not in subject_pair_tags and "man are mid-transition" not in subject_pair_tags, "SDXL tag splitter emitted broken paired character fragments")
sentence_boundary_tags = sdxl_tag_policy.split_tag_text("keep hands on hips, breasts, thighs. Man watches close")
sentence_boundary_tags_lower = [tag.lower() for tag in sentence_boundary_tags]
_expect("thighs" in sentence_boundary_tags, "SDXL tag splitter lost pre-period tag")
_expect("man watches close" in sentence_boundary_tags_lower, "SDXL tag splitter did not split sentence-boundary tag")
_expect(
"thighs. man watches close" not in sentence_boundary_tags_lower,
"SDXL tag splitter kept sentence-boundary tag fragment",
)
_expect(
sdxl_formatter._camera_tags(row) == sdxl_tag_policy.camera_tags(row),
"SDXL formatter camera helper should delegate to sdxl_tag_policy",