Add Krea2 POV routing and eval tooling
This commit is contained in:
@@ -51,6 +51,31 @@ class KreaConfiguredCastDependencies:
|
||||
paragraph: Callable[[list[str]], str]
|
||||
|
||||
|
||||
def _coworking_action_anchor(action_family: str, scene_text: str, action: str) -> str:
|
||||
action_lower = action.lower()
|
||||
if "office chair seat and chair arms" in action_lower:
|
||||
return ""
|
||||
scene_lower = scene_text.lower()
|
||||
if not any(term in scene_lower for term in ("coworking", "office", "desk", "laptop", "glass partition")):
|
||||
return ""
|
||||
if action_family == "climax" and "post-ejaculation open-thigh display" in action_lower:
|
||||
return (
|
||||
"office chair seat and chair arms frame the lower foreground around her open thighs, "
|
||||
"with desk edges, laptop tables, glass partitions, plants, and tall-window depth beside and behind her body"
|
||||
)
|
||||
if "broad v-frame" in action_lower and "open-thigh frame" in action_lower:
|
||||
return (
|
||||
"office chair seat and chair arms frame the lower foreground around her hips and raised knees, "
|
||||
"with desk edges, laptop tables, glass partitions, plants, and tall-window depth beside and behind her body"
|
||||
)
|
||||
if action_family != "manual":
|
||||
return ""
|
||||
return (
|
||||
"office chair seat and chair arms frame the lower foreground around her hips, "
|
||||
"with desk edges, laptop tables, glass partitions, plants, and tall-window depth beside and behind her body"
|
||||
)
|
||||
|
||||
|
||||
def format_configured_cast_result(
|
||||
request: KreaConfiguredCastRequest,
|
||||
deps: KreaConfiguredCastDependencies,
|
||||
@@ -88,13 +113,14 @@ def format_configured_cast_result(
|
||||
item = deps.natural_label_text(item, cast_labels)
|
||||
axis_values = deps.sanitize_hardcore_axis_values(row.get("item_axis_values"))
|
||||
detail_density = deps.normalize_hardcore_detail_density(row.get("hardcore_detail_density"))
|
||||
action_family = deps.row_action_family(row)
|
||||
action = deps.hardcore_action_sentence(
|
||||
role_graph,
|
||||
item,
|
||||
source_composition,
|
||||
axis_values,
|
||||
detail_density,
|
||||
deps.row_action_family(row),
|
||||
action_family,
|
||||
)
|
||||
action = deps.pov_action_phrase(
|
||||
action,
|
||||
@@ -105,9 +131,15 @@ def format_configured_cast_result(
|
||||
axis_values,
|
||||
detail_density,
|
||||
)
|
||||
scene_anchor = _coworking_action_anchor(
|
||||
action_family,
|
||||
" ".join(part for part in (request.scene, request.camera_scene, composition, source_composition) if part),
|
||||
action,
|
||||
)
|
||||
output_composition = deps.pov_composition_text(composition, pov_labels)
|
||||
parts = [
|
||||
action,
|
||||
scene_anchor,
|
||||
deps.pov_camera_phrase(pov_labels),
|
||||
cast_prose,
|
||||
f"A consensual explicit adult scene with {subject}" if not action else "",
|
||||
|
||||
Reference in New Issue
Block a user