Improve paired cast continuity and wording
This commit is contained in:
+30
-3
@@ -118,6 +118,18 @@ def _row_value(row: dict[str, Any], key: str, labels: tuple[str, ...] = ()) -> s
|
||||
return ""
|
||||
|
||||
|
||||
def _body_phrase(body: Any, figure_note: Any = "") -> str:
|
||||
body = _clean(body)
|
||||
figure_note = _clean(figure_note)
|
||||
if not body:
|
||||
return figure_note
|
||||
if not figure_note:
|
||||
return f"{body} figure"
|
||||
if "figure" in figure_note.lower():
|
||||
return f"{body} build and {figure_note}"
|
||||
return f"{body} figure with {figure_note}"
|
||||
|
||||
|
||||
def _single_caption_front(row: dict[str, Any]) -> dict[str, str]:
|
||||
caption = _strip_trigger(_clean(row.get("caption")), False)
|
||||
if not caption:
|
||||
@@ -128,7 +140,7 @@ def _single_caption_front(row: dict[str, Any]) -> dict[str, str]:
|
||||
if not body:
|
||||
body_type = _clean(row.get("body_type") or row.get("body"))
|
||||
figure = _clean(row.get("figure"))
|
||||
body = f"{body_type} figure with {figure}" if body_type and figure else f"{body_type} figure".strip()
|
||||
body = _body_phrase(body_type, figure)
|
||||
front = f"{subject}, {age}, {body}, "
|
||||
if subject in ("woman", "man") and age and body and caption.startswith(front):
|
||||
try:
|
||||
@@ -260,6 +272,11 @@ def _normal_row_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
|
||||
def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str) -> tuple[str, str, str, str]:
|
||||
descriptor = _clean(row.get("shared_descriptor"))
|
||||
cast_descriptors = row.get("shared_cast_descriptors")
|
||||
if isinstance(cast_descriptors, list):
|
||||
cast_descriptor_text = "; ".join(_clean(item) for item in cast_descriptors if _clean(item))
|
||||
else:
|
||||
cast_descriptor_text = _clean(cast_descriptors)
|
||||
soft = row.get("softcore_row") if isinstance(row.get("softcore_row"), dict) else {}
|
||||
hard = row.get("hardcore_row") if isinstance(row.get("hardcore_row"), dict) else {}
|
||||
soft_camera = _clean(row.get("softcore_camera_directive")) or _camera_phrase(soft)
|
||||
@@ -274,9 +291,18 @@ def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
hard_cast_text = _clean(hard.get("cast_summary")) or (
|
||||
f"{hard_cast} adult women and {hard_men} adult men" if hard_cast or hard_men else ""
|
||||
)
|
||||
same_room = options.get("continuity") == "same_creator_same_room"
|
||||
hard_scene = soft.get("scene_text") if same_room and soft.get("scene_text") else hard.get("scene_text")
|
||||
hard_composition = soft.get("composition") if same_room and soft.get("composition") else hard.get("composition")
|
||||
soft_cast_descriptor_text = (
|
||||
cast_descriptor_text
|
||||
if options.get("softcore_cast") == "same_as_hardcore"
|
||||
else f"Woman A / primary creator: {descriptor}"
|
||||
)
|
||||
|
||||
soft_parts = [
|
||||
f"A visibly adult creator, {descriptor}",
|
||||
f"Shared cast descriptors: {soft_cast_descriptor_text}" if soft_cast_descriptor_text else "",
|
||||
f"shown in a {soft_level or 'softcore'} Insta/OF creator image",
|
||||
f"wearing {soft.get('item')}" if soft.get("item") else "",
|
||||
f"{soft.get('pose')}" if soft.get("pose") else "",
|
||||
@@ -288,12 +314,13 @@ def _insta_pair_to_krea(row: dict[str, Any], detail_level: str, style_mode: str)
|
||||
]
|
||||
hard_parts = [
|
||||
f"The same visibly adult creator, {descriptor}, is the visually central woman in a consensual explicit adult {hard_level or 'hardcore'} scene",
|
||||
f"Shared cast descriptors: {cast_descriptor_text}" if cast_descriptor_text else "",
|
||||
f"all participants are 21+ and visibly adult; the cast includes {hard_cast_text}" if hard_cast_text else "all participants are 21+ and visibly adult",
|
||||
_clean(hard.get("role_graph")),
|
||||
f"The sexual action is {hard.get('item')}" if hard.get("item") else "",
|
||||
f"set in {row.get('hardcore_row', {}).get('scene_text') or hard.get('scene_text')}" if hard.get("scene_text") else "",
|
||||
f"set in {hard_scene}" if hard_scene else "",
|
||||
f"with {hard.get('expression')}" if hard.get("expression") else "",
|
||||
f"framed as {hard.get('composition')}" if hard.get("composition") else "",
|
||||
f"framed as {hard_composition}" if hard_composition else "",
|
||||
hard_camera,
|
||||
hard_style if detail_level != "concise" else "",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user