Extract anal role graph wording
This commit is contained in:
@@ -163,6 +163,23 @@ def _character_cast(*, pov_man: bool = False) -> str:
|
||||
)["character_cast"]
|
||||
|
||||
|
||||
def _character_cast_two_men(*, pov_first_man: bool = False) -> str:
|
||||
cast = _character_cast(pov_man=pov_first_man)
|
||||
return pb.build_character_slot_json(
|
||||
subject_type="man",
|
||||
label="B",
|
||||
age="41-year-old adult",
|
||||
ethnicity="western_european",
|
||||
figure="balanced",
|
||||
body="average",
|
||||
descriptor_detail="compact",
|
||||
expression_intensity=0.55,
|
||||
softcore_expression_intensity=0.35,
|
||||
hardcore_expression_intensity=0.75,
|
||||
character_cast=cast,
|
||||
)["character_cast"]
|
||||
|
||||
|
||||
def _action_filter(focus: str, hardcore_position_config: str | dict[str, Any] | None = "") -> str:
|
||||
kwargs = {
|
||||
"allow_toys": False,
|
||||
@@ -192,6 +209,28 @@ def _position_filter(focus: str, family: str, positions: list[str] | tuple[str,
|
||||
return _action_filter(focus, position_config)
|
||||
|
||||
|
||||
def _anal_double_filter(positions: list[str] | tuple[str, ...] | str) -> str:
|
||||
position_config = pb.build_hardcore_position_pool_json(
|
||||
combine_mode="replace",
|
||||
family="anal",
|
||||
selected_positions=positions,
|
||||
)
|
||||
return pb.build_hardcore_action_filter_json(
|
||||
hardcore_position_config=position_config,
|
||||
focus="anal_only",
|
||||
allow_toys=True,
|
||||
allow_double=True,
|
||||
allow_penetration=True,
|
||||
allow_foreplay=False,
|
||||
allow_interaction=False,
|
||||
allow_manual=False,
|
||||
allow_oral=False,
|
||||
allow_outercourse=False,
|
||||
allow_anal=True,
|
||||
allow_climax=False,
|
||||
)
|
||||
|
||||
|
||||
def _coworking_location_config() -> str:
|
||||
return pb.build_location_pool_json(
|
||||
enabled=True,
|
||||
@@ -967,6 +1006,135 @@ def smoke_pov_penetration_position_routes() -> None:
|
||||
_expect(term in prompt, f"{name} Krea prompt missing {term!r}: {prompt}")
|
||||
|
||||
|
||||
def smoke_pov_anal_position_routes() -> None:
|
||||
cases = [
|
||||
(
|
||||
"pov_anal_doggy",
|
||||
"doggy",
|
||||
("on all fours", "positioned behind her"),
|
||||
("on all fours directly in front", "penetrates her ass"),
|
||||
),
|
||||
(
|
||||
"pov_anal_bent_over",
|
||||
"bent_over",
|
||||
("bent forward", "stands behind her"),
|
||||
("bent forward at the waist", "penetrates her ass"),
|
||||
),
|
||||
(
|
||||
"pov_anal_face_down",
|
||||
"face_down_ass_up",
|
||||
("lies face-down", "ass raised"),
|
||||
("lying face-down", "penetrates her ass"),
|
||||
),
|
||||
(
|
||||
"pov_anal_standing",
|
||||
"standing",
|
||||
("stands braced", "stands behind her"),
|
||||
("pov standing rear-entry position", "viewer stands behind her"),
|
||||
),
|
||||
(
|
||||
"pov_anal_side_lying",
|
||||
"side_lying",
|
||||
("lies on her side", "presses behind her"),
|
||||
("pov side-lying sex position", "viewer is behind her"),
|
||||
),
|
||||
(
|
||||
"pov_anal_edge_supported",
|
||||
"edge_supported",
|
||||
("raised edge", "kneels behind her"),
|
||||
("pov raised-edge penetration position", "viewer kneels between her legs"),
|
||||
),
|
||||
(
|
||||
"pov_anal_kneeling",
|
||||
"kneeling",
|
||||
("kneels forward", "kneels behind her"),
|
||||
("pov kneeling rear-entry position", "viewer kneels behind her"),
|
||||
),
|
||||
]
|
||||
for offset, (name, position_key, role_terms, krea_terms) in enumerate(cases, start=3901):
|
||||
pair = pb.build_insta_of_pair(
|
||||
row_number=1,
|
||||
start_index=1,
|
||||
seed=offset,
|
||||
ethnicity="any",
|
||||
figure="random",
|
||||
no_plus_women=False,
|
||||
no_black=False,
|
||||
trigger=Trigger,
|
||||
prepend_trigger_to_prompt=True,
|
||||
options_json=_insta_options(
|
||||
softcore_camera_mode="from_camera_config",
|
||||
hardcore_camera_mode="from_camera_config",
|
||||
camera_detail="compact",
|
||||
),
|
||||
character_cast=_character_cast(pov_man=True),
|
||||
hardcore_position_config=_position_filter("anal_only", "anal", [position_key]),
|
||||
location_config=_coworking_location_config(),
|
||||
hardcore_camera_config=_orbit_camera(
|
||||
horizontal_angle=45,
|
||||
vertical_angle=0,
|
||||
zoom=7.5,
|
||||
subject_focus="action",
|
||||
),
|
||||
)
|
||||
_expect_pair(pair, name)
|
||||
hard_row = pair.get("hardcore_row") or {}
|
||||
_expect(hard_row.get("position_family") == "anal", f"{name} position_family should be anal")
|
||||
_expect(position_key in (hard_row.get("position_keys") or []), f"{name} lost position key {position_key!r}")
|
||||
role_graph = _expect_text(f"{name}.source_role_graph", hard_row.get("source_role_graph"), 40).lower()
|
||||
for term in role_terms:
|
||||
_expect(term in role_graph, f"{name} role graph missing {term!r}: {role_graph}")
|
||||
krea = krea_formatter.format_krea2_prompt("", metadata_json=_json(pair), target="hardcore")
|
||||
prompt = _expect_text(f"{name}.krea_prompt", krea.get("krea_prompt"), 60).lower()
|
||||
_expect("metadata" in krea.get("method", ""), f"{name}.krea did not use metadata")
|
||||
_expect("viewer" in prompt and "first-person" in prompt, f"{name} Krea prompt lost POV wording")
|
||||
_expect("camera:" not in krea.get("krea_prompt", ""), f"{name} Krea prompt emitted normal third-person camera directive")
|
||||
for term in krea_terms:
|
||||
_expect(term in prompt, f"{name} Krea prompt missing {term!r}: {prompt}")
|
||||
|
||||
|
||||
def smoke_double_front_back_route() -> None:
|
||||
pair = pb.build_insta_of_pair(
|
||||
row_number=1,
|
||||
start_index=1,
|
||||
seed=3911,
|
||||
ethnicity="any",
|
||||
figure="random",
|
||||
no_plus_women=False,
|
||||
no_black=False,
|
||||
trigger=Trigger,
|
||||
prepend_trigger_to_prompt=True,
|
||||
options_json=_insta_options(
|
||||
hardcore_cast="mixed_group",
|
||||
hardcore_men_count=2,
|
||||
softcore_camera_mode="from_camera_config",
|
||||
hardcore_camera_mode="from_camera_config",
|
||||
camera_detail="compact",
|
||||
),
|
||||
character_cast=_character_cast_two_men(),
|
||||
hardcore_position_config=_anal_double_filter(["front_back"]),
|
||||
location_config=_coworking_location_config(),
|
||||
hardcore_camera_config=_orbit_camera(
|
||||
horizontal_angle=45,
|
||||
vertical_angle=0,
|
||||
zoom=7.5,
|
||||
subject_focus="action",
|
||||
),
|
||||
)
|
||||
_expect_pair(pair, "double_front_back_route")
|
||||
hard_row = pair.get("hardcore_row") or {}
|
||||
_expect(hard_row.get("position_family") == "anal", "double route position_family should be anal")
|
||||
_expect("front_back" in (hard_row.get("position_keys") or []), "double route lost front_back key")
|
||||
role_graph = _expect_text("double_front_back_route.source_role_graph", hard_row.get("source_role_graph"), 40).lower()
|
||||
_expect("second penetration point from the front" in role_graph, f"double route role graph lost front/back placement: {role_graph}")
|
||||
krea = krea_formatter.format_krea2_prompt("", metadata_json=_json(pair), target="hardcore")
|
||||
prompt = _expect_text("double_front_back_route.krea_prompt", krea.get("krea_prompt"), 60).lower()
|
||||
_expect("metadata" in krea.get("method", ""), "double route Krea did not use metadata")
|
||||
_expect("front-and-back" in prompt, "double route Krea lost front/back position wording")
|
||||
_expect("second penetration point" in prompt, "double route Krea lost second-contact wording")
|
||||
_expect("role graph:" not in prompt and "sexual scene:" not in prompt, "double route Krea leaked raw labels")
|
||||
|
||||
|
||||
def smoke_no_expression_fallback() -> None:
|
||||
cast = pb.build_character_slot_json(
|
||||
subject_type="woman",
|
||||
@@ -1101,6 +1269,8 @@ SMOKE_CASES: list[tuple[str, Callable[[], None]]] = [
|
||||
("pov_outercourse_position_routes", smoke_pov_outercourse_position_routes),
|
||||
("pov_oral_position_routes", smoke_pov_oral_position_routes),
|
||||
("pov_penetration_position_routes", smoke_pov_penetration_position_routes),
|
||||
("pov_anal_position_routes", smoke_pov_anal_position_routes),
|
||||
("double_front_back_route", smoke_double_front_back_route),
|
||||
("expression_disabled", smoke_no_expression_fallback),
|
||||
("formatter_metadata_fixtures", smoke_formatter_metadata_fixtures),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user