Keep SDXL explicit tags metadata driven
This commit is contained in:
@@ -4435,6 +4435,43 @@ def smoke_sdxl_tag_routes() -> None:
|
||||
"Typed SDXL row tag route should match legacy wrapper output",
|
||||
)
|
||||
_expect("sdxl route tag" in typed_row.as_text(), "Typed SDXL row tag route lost route-specific formatter hint")
|
||||
stale_prompt_row = _fixture_hardcore_row(
|
||||
prompt="stale raw prompt mentions fully nude naked pussy penis oral anal semen penetration",
|
||||
item="standing portrait setup",
|
||||
pose="standing pose",
|
||||
role_graph="",
|
||||
source_role_graph="",
|
||||
expression="neutral expression",
|
||||
action_family="",
|
||||
position_family="",
|
||||
position_key="",
|
||||
position_keys=[],
|
||||
)
|
||||
stale_tags = sdxl_tag_routes.row_core_tags_result(
|
||||
sdxl_tag_routes.SDXLRowTagRequest(stale_prompt_row, 1.29),
|
||||
deps,
|
||||
).as_text()
|
||||
for forbidden in ("(naked:", "pussy", "penis", "oral sex", "anal sex", "semen", "penetration"):
|
||||
_expect(forbidden not in stale_tags, f"SDXL row tags should not infer explicit tag from stale prompt: {forbidden}")
|
||||
|
||||
metadata_explicit_row = _fixture_hardcore_row(
|
||||
prompt="stale raw prompt without explicit tag anchors",
|
||||
item="kneeling pose with visible penis and pussy contact",
|
||||
pose="penetration pose",
|
||||
role_graph="penis thrusts into pussy",
|
||||
source_role_graph="penis thrusts into pussy",
|
||||
hardcore_clothing_state="fully nude body, bare skin unobstructed",
|
||||
action_family="penetration",
|
||||
position_family="penetrative",
|
||||
position_key="kneeling",
|
||||
position_keys=["kneeling"],
|
||||
)
|
||||
metadata_tags = sdxl_tag_routes.row_core_tags_result(
|
||||
sdxl_tag_routes.SDXLRowTagRequest(metadata_explicit_row, 1.29),
|
||||
deps,
|
||||
).as_text()
|
||||
for required in ("(naked:1.29)", "pussy", "penis", "penetration"):
|
||||
_expect(required in metadata_tags, f"SDXL row tags lost structured explicit metadata tag: {required}")
|
||||
|
||||
pair = pb.build_insta_of_pair(
|
||||
row_number=1,
|
||||
@@ -4469,6 +4506,53 @@ def smoke_sdxl_tag_routes() -> None:
|
||||
typed_hard.as_text() == sdxl_formatter._hard_tags(hard_row, pair, 1.29),
|
||||
"Typed SDXL pair hard tag route should match legacy wrapper output",
|
||||
)
|
||||
pair_stale_hard_row = _fixture_hardcore_row(
|
||||
prompt="",
|
||||
item="standing portrait setup",
|
||||
pose="standing pose",
|
||||
role_graph="",
|
||||
source_role_graph="",
|
||||
expression="neutral expression",
|
||||
composition="standing portrait frame",
|
||||
action_family="",
|
||||
position_family="",
|
||||
position_key="",
|
||||
position_keys=[],
|
||||
)
|
||||
pair_stale_root = {
|
||||
"hardcore_prompt": "stale pair prompt says fully nude naked pussy penis oral anal semen penetration",
|
||||
"hardcore_women_count": 1,
|
||||
"hardcore_men_count": 1,
|
||||
}
|
||||
pair_stale_tags = sdxl_tag_routes.hard_tags_result(
|
||||
sdxl_tag_routes.SDXLPairTagRequest(pair_stale_hard_row, pair_stale_root, 1.29),
|
||||
deps,
|
||||
).as_text()
|
||||
for forbidden in ("(naked:", "pussy", "penis", "oral sex", "anal sex", "semen", "penetration"):
|
||||
_expect(forbidden not in pair_stale_tags, f"SDXL pair tags should not infer explicit tag from stale prompt: {forbidden}")
|
||||
|
||||
pair_metadata_root = {
|
||||
"hardcore_prompt": "stale pair prompt without explicit tag anchors",
|
||||
"hardcore_women_count": 1,
|
||||
"hardcore_men_count": 1,
|
||||
"hardcore_clothing_state": "fully nude body, bare skin unobstructed",
|
||||
}
|
||||
pair_metadata_hard_row = _fixture_hardcore_row(
|
||||
prompt="",
|
||||
item="kneeling pose with visible penis and pussy contact",
|
||||
role_graph="penis thrusts into pussy",
|
||||
source_role_graph="penis thrusts into pussy",
|
||||
action_family="penetration",
|
||||
position_family="penetrative",
|
||||
position_key="kneeling",
|
||||
position_keys=["kneeling"],
|
||||
)
|
||||
pair_metadata_tags = sdxl_tag_routes.hard_tags_result(
|
||||
sdxl_tag_routes.SDXLPairTagRequest(pair_metadata_hard_row, pair_metadata_root, 1.29),
|
||||
deps,
|
||||
).as_text()
|
||||
for required in ("(naked:1.29)", "pussy", "penis", "penetration"):
|
||||
_expect(required in pair_metadata_tags, f"SDXL pair tags lost structured explicit metadata tag: {required}")
|
||||
formatted = sdxl_formatter.format_sdxl_prompt(
|
||||
"",
|
||||
metadata_json=_json(pair),
|
||||
|
||||
Reference in New Issue
Block a user