Move pair cast styling policy

This commit is contained in:
2026-06-27 03:37:33 +02:00
parent 049f2c6e87
commit 972c8f14b6
4 changed files with 112 additions and 63 deletions
+3 -45
View File
@@ -3934,18 +3934,10 @@ def _insta_of_cast_descriptors(
return descriptors
def _insta_of_cast_phrase(women_count: int, men_count: int) -> str:
context = _configured_cast_context(women_count, men_count)
return context["cast_summary"]
def _insta_of_prompt_cast_descriptors(text: str) -> str:
return str(text or "").replace("Woman A / primary creator:", "Woman A:")
SOFTCORE_CAST_POSES = pair_options.SOFTCORE_CAST_POSES
def _insta_of_softcore_category(level: str) -> tuple[str, str]:
return pair_options.softcore_category(level)
@@ -3962,41 +3954,6 @@ def _insta_of_softcore_pose(rng: random.Random, level: str) -> str:
return g.choose(rng, pair_options.softcore_pose_pool(level))
def _insta_of_partner_styling(
seed_config: dict[str, int],
seed: int,
row_number: int,
women_count: int,
men_count: int,
pov_labels: list[str] | None = None,
label_map: dict[str, dict[str, Any]] | None = None,
) -> dict[str, Any]:
content_rng = _axis_rng(seed_config, "content", seed, row_number + 421)
pose_rng = _axis_rng(seed_config, "pose", seed, row_number + 421)
pov_set = set(pov_labels or [])
outfits: list[str] = []
for index in range(max(0, women_count - 1)):
label = chr(ord("B") + index)
full_label = f"Woman {label}"
outfit = _slot_softcore_outfit((label_map or {}).get(full_label), content_rng) or g.choose(content_rng, INSTA_OF_SOFTCORE_PARTNER_WOMEN_OUTFITS)
sentence = pair_clothing.softcore_outfit_sentence(full_label, outfit)
if sentence:
outfits.append(sentence)
for index in range(max(0, men_count)):
label = chr(ord("A") + index)
full_label = f"Man {label}"
if full_label in pov_set:
continue
outfit = _slot_softcore_outfit((label_map or {}).get(full_label), content_rng) or g.choose(content_rng, INSTA_OF_SOFTCORE_PARTNER_MEN_OUTFITS)
sentence = pair_clothing.softcore_outfit_sentence(full_label, outfit)
if sentence:
outfits.append(sentence)
return {
"outfits": outfits,
"pose": g.choose(pose_rng, SOFTCORE_CAST_POSES),
}
def build_insta_of_pair(
row_number: int,
start_index: int,
@@ -4098,8 +4055,9 @@ def build_insta_of_pair(
descriptor_from_row=_insta_of_descriptor,
build_cast_descriptors=_insta_of_cast_descriptors,
prompt_cast_descriptors=_insta_of_prompt_cast_descriptors,
partner_styling=_insta_of_partner_styling,
cast_phrase=_insta_of_cast_phrase,
axis_rng=_axis_rng,
choose=g.choose,
slot_softcore_outfit=_slot_softcore_outfit,
)
descriptor = cast_context["descriptor"]
cast_descriptors = cast_context["cast_descriptors"]