Add Krea2 POV routing and eval tooling

This commit is contained in:
2026-06-30 19:28:10 +02:00
parent 284c6279e6
commit f5ba07e340
29 changed files with 6331 additions and 400 deletions
+33 -5
View File
@@ -39,8 +39,11 @@ HARDCORE_POSITION_FOCUS_CHOICES = [
]
HARDCORE_POSITION_KEY_CHOICES = [
"missionary",
"missionary_folded",
"cowgirl",
"cowgirl_alt",
"reverse_cowgirl",
"reverse_cowgirl_alt",
"doggy",
"bent_over",
"face_down_ass_up",
@@ -123,8 +126,11 @@ HARDCORE_POSITION_FAMILY_SUBCATEGORIES = {
}
HARDCORE_POSITION_KEY_MATCHES = {
"missionary": ("missionary", "above her", "under her"),
"missionary_folded": ("folded missionary", "knees-to-chest", "knees to chest", "folded legs", "folded high"),
"cowgirl": ("cowgirl", "straddling", "straddles", "on top", "squatting on top"),
"cowgirl_alt": ("cowgirl-alt", "low cowgirl", "seated-squat cowgirl", "low seated squat"),
"reverse_cowgirl": ("reverse cowgirl", "facing away"),
"reverse_cowgirl_alt": ("reverse cowgirl alt", "upright reverse cowgirl", "upright back-facing straddle"),
"doggy": ("doggy", "all fours", "rear-entry", "from behind"),
"bent_over": ("bent-over", "bent over", "hips raised"),
"face_down_ass_up": ("face-down", "ass-up"),
@@ -168,6 +174,28 @@ HARDCORE_POSITION_KEY_MATCHES = {
"open_thighs": ("thighs open", "legs spread", "open thighs", "legs open", "reclining with thighs open"),
"front_back": ("front-and-back", "front and back", "one behind and one in front", "between two partners"),
}
def _text_matches_position_key(text: str, position: str) -> bool:
terms = HARDCORE_POSITION_KEY_MATCHES.get(position, ())
if not any(term in text for term in terms):
return False
if position == "missionary" and any(term in text for term in HARDCORE_POSITION_KEY_MATCHES["missionary_folded"]):
return False
if position == "cowgirl" and any(
term in text
for term in (
HARDCORE_POSITION_KEY_MATCHES["cowgirl_alt"]
+ HARDCORE_POSITION_KEY_MATCHES["reverse_cowgirl"]
+ HARDCORE_POSITION_KEY_MATCHES["reverse_cowgirl_alt"]
)
):
return False
if position == "reverse_cowgirl" and any(term in text for term in HARDCORE_POSITION_KEY_MATCHES["reverse_cowgirl_alt"]):
return False
return True
HARDCORE_POSITION_AXIS_KEYS = {
"position",
"body_position",
@@ -733,7 +761,7 @@ def hardcore_position_entry_matches(entry: Any, config: dict[str, Any]) -> bool:
return bool(set(metadata_keys) & set(positions))
text = _entry_text(entry).lower()
for position in positions:
if any(term in text for term in HARDCORE_POSITION_KEY_MATCHES.get(position, ())):
if _text_matches_position_key(text, position):
return True
return False
@@ -749,8 +777,8 @@ def hardcore_position_entry_conflicts(entry: Any, config: dict[str, Any]) -> boo
text = _entry_text(entry).lower()
matched = {
position
for position, terms in HARDCORE_POSITION_KEY_MATCHES.items()
if any(term in text for term in terms)
for position in HARDCORE_POSITION_KEY_MATCHES
if _text_matches_position_key(text, position)
}
return bool(matched) and not bool(matched & selected)
@@ -861,8 +889,8 @@ def hardcore_position_keys(*parts: Any, axis_values: dict[str, Any] | None = Non
if not text:
return []
keys: list[str] = []
for key, tokens in HARDCORE_POSITION_KEY_MATCHES.items():
if any(token in text for token in tokens):
for key in HARDCORE_POSITION_KEY_MATCHES:
if _text_matches_position_key(text, key):
keys.append(key)
return keys