Use item axis values in SDXL tags
This commit is contained in:
@@ -4485,6 +4485,18 @@ def smoke_sdxl_tag_policy() -> None:
|
||||
sdxl_formatter._metadata_family_tags(row) == sdxl_tag_policy.metadata_family_tags(row),
|
||||
"SDXL formatter metadata-family helper should delegate to sdxl_tag_policy",
|
||||
)
|
||||
axis_row = {
|
||||
"item_axis_values": {
|
||||
"position": "edge-supported kneeling pose",
|
||||
"contact_detail": "hands braced on thighs, close body alignment",
|
||||
"ignored": "random",
|
||||
}
|
||||
}
|
||||
axis_tags = sdxl_tag_policy.axis_value_tags(axis_row)
|
||||
_expect("edge-supported kneeling pose" in axis_tags, "SDXL axis tags lost selected position axis")
|
||||
_expect("hands braced on thighs" in axis_tags, "SDXL axis tags lost selected detail axis")
|
||||
_expect("close body alignment" in axis_tags, "SDXL axis tags lost split detail axis")
|
||||
_expect("random" not in axis_tags, "SDXL axis tags should ignore random placeholders")
|
||||
_expect(
|
||||
sdxl_formatter._camera_tags(row) == sdxl_tag_policy.camera_tags(row),
|
||||
"SDXL formatter camera helper should delegate to sdxl_tag_policy",
|
||||
@@ -4499,6 +4511,7 @@ def smoke_sdxl_tag_policy() -> None:
|
||||
_expect(deps.tag_key is sdxl_tag_policy.tag_key, "SDXL route deps lost policy tag_key")
|
||||
_expect(deps.normal_character_tags is sdxl_tag_policy.normal_character_tags, "SDXL route deps lost character tag policy")
|
||||
_expect(deps.metadata_family_tags is sdxl_tag_policy.metadata_family_tags, "SDXL route deps lost metadata family policy")
|
||||
_expect(deps.axis_value_tags is sdxl_tag_policy.axis_value_tags, "SDXL route deps lost axis-value tag policy")
|
||||
_expect(deps.camera_tags is sdxl_tag_policy.camera_tags, "SDXL route deps lost camera tag policy")
|
||||
_expect(deps.explicit_tags is sdxl_tag_policy.explicit_tags, "SDXL route deps lost explicit tag policy")
|
||||
_expect(deps.softcore_pair_tags is sdxl_tag_policy.softcore_pair_tags, "SDXL route deps lost softcore pair tag policy")
|
||||
@@ -4547,6 +4560,27 @@ 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")
|
||||
axis_only_row = _fixture_hardcore_row(
|
||||
item="generic configured adult action",
|
||||
pose="configured explicit pose",
|
||||
role_graph="",
|
||||
source_role_graph="",
|
||||
item_axis_values={
|
||||
"position": "standing oral position",
|
||||
"contact_detail": "mouth contact at hip height, hands on hips",
|
||||
},
|
||||
action_family="oral",
|
||||
position_family="oral",
|
||||
position_key="standing",
|
||||
position_keys=["standing"],
|
||||
)
|
||||
axis_only_tags = sdxl_tag_routes.row_core_tags_result(
|
||||
sdxl_tag_routes.SDXLRowTagRequest(axis_only_row, 1.29),
|
||||
deps,
|
||||
).as_text()
|
||||
_expect("standing oral position" in axis_only_tags, "SDXL row route lost item axis position tag")
|
||||
_expect("mouth contact at hip height" in axis_only_tags, "SDXL row route lost item axis contact tag")
|
||||
_expect("hands on hips" in axis_only_tags, "SDXL row route lost split item axis detail tag")
|
||||
stale_character_route_row = _fixture_hardcore_row(
|
||||
prompt="Characters: stale prompt subject, stale body, stale skin, stale hair, stale eyes.",
|
||||
cast_descriptor_text="",
|
||||
@@ -4688,6 +4722,12 @@ def smoke_sdxl_tag_routes() -> None:
|
||||
).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}")
|
||||
pair_axis_tags = sdxl_tag_routes.hard_tags_result(
|
||||
sdxl_tag_routes.SDXLPairTagRequest(axis_only_row, pair_metadata_root, 1.29),
|
||||
deps,
|
||||
).as_text()
|
||||
_expect("standing oral position" in pair_axis_tags, "SDXL pair hard route lost item axis position tag")
|
||||
_expect("mouth contact at hip height" in pair_axis_tags, "SDXL pair hard route lost item axis contact tag")
|
||||
formatted = sdxl_formatter.format_sdxl_prompt(
|
||||
"",
|
||||
metadata_json=_json(pair),
|
||||
|
||||
Reference in New Issue
Block a user