Synchronize pair side metadata
This commit is contained in:
@@ -835,6 +835,12 @@ def smoke_row_normalization_policy() -> None:
|
||||
"hardcore_caption": f"{Trigger}, {Trigger}, hard caption.",
|
||||
"softcore_negative_prompt": "bad anatomy, bad anatomy",
|
||||
"hardcore_negative_prompt": "bad anatomy, low quality, bad anatomy",
|
||||
"softcore_partner_styling": {"outfits": ["partner outfit"], "pose": "partner pose"},
|
||||
"hardcore_clothing_state": "structured hard clothing state",
|
||||
"character_hardcore_clothing": ["Woman A custom hard clothing"],
|
||||
"default_man_hardcore_clothing": ["Man A default hard clothing"],
|
||||
"hardcore_detail_density": "dense",
|
||||
"hardcore_position_config": {"family": "oral"},
|
||||
"softcore_row": {
|
||||
"prompt": f"{Trigger}, {Trigger}, embedded soft.",
|
||||
"caption": f"{Trigger}, {Trigger}, embedded soft caption.",
|
||||
@@ -860,6 +866,18 @@ def smoke_row_normalization_policy() -> None:
|
||||
pair["hardcore_row"].get("caption") == pair.get("hardcore_caption"),
|
||||
"Pair normalization left stale hard row caption text",
|
||||
)
|
||||
_expect(
|
||||
pair["softcore_row"].get("softcore_partner_styling") == pair.get("softcore_partner_styling"),
|
||||
"Pair normalization left stale soft side metadata",
|
||||
)
|
||||
_expect(
|
||||
pair["hardcore_row"].get("hardcore_clothing_state") == pair.get("hardcore_clothing_state"),
|
||||
"Pair normalization left stale hard clothing metadata",
|
||||
)
|
||||
_expect(
|
||||
pair["hardcore_row"].get("default_man_hardcore_clothing") == pair.get("default_man_hardcore_clothing"),
|
||||
"Pair normalization left stale hard default clothing metadata",
|
||||
)
|
||||
_expect_no_duplicate_comma_items("row_normalization.pair.soft_negative", pair.get("softcore_negative_prompt"))
|
||||
_expect_no_duplicate_comma_items("row_normalization.pair.hard_row_negative", pair["hardcore_row"].get("negative_prompt"))
|
||||
|
||||
@@ -1511,6 +1529,20 @@ def _expect_pair(pair: dict[str, Any], name: str) -> None:
|
||||
pair["hardcore_row"].get("negative_prompt") == pair.get("hardcore_negative_prompt"),
|
||||
f"{name}.hardcore_row negative drifted from pair negative",
|
||||
)
|
||||
if "softcore_partner_styling" in pair:
|
||||
_expect(
|
||||
pair["softcore_row"].get("softcore_partner_styling") == pair.get("softcore_partner_styling"),
|
||||
f"{name}.softcore_row partner styling drifted from pair root",
|
||||
)
|
||||
for key in (
|
||||
"hardcore_clothing_state",
|
||||
"character_hardcore_clothing",
|
||||
"default_man_hardcore_clothing",
|
||||
"hardcore_detail_density",
|
||||
"hardcore_position_config",
|
||||
):
|
||||
if key in pair:
|
||||
_expect(pair["hardcore_row"].get(key) == pair.get(key), f"{name}.hardcore_row {key} drifted from pair root")
|
||||
_expect_no_duplicate_comma_items(f"{name}.softcore_negative", pair.get("softcore_negative_prompt"))
|
||||
_expect_no_duplicate_comma_items(f"{name}.hardcore_negative", pair.get("hardcore_negative_prompt"))
|
||||
_expect_formatter_outputs(pair, name, target="softcore")
|
||||
|
||||
Reference in New Issue
Block a user