Extract Krea POV action helpers
This commit is contained in:
@@ -135,8 +135,8 @@ Owner: `krea_formatter.py`.
|
||||
Keep here:
|
||||
|
||||
- Krea prose style;
|
||||
- hardcore action sentence rewriting;
|
||||
- POV sentence rewriting;
|
||||
- Krea route orchestration;
|
||||
- remaining hardcore action sentence dispatch;
|
||||
- camera-scene preservation;
|
||||
- fallback text parsing.
|
||||
|
||||
@@ -151,11 +151,14 @@ Already isolated:
|
||||
POV formatter routes.
|
||||
- `krea_pov.py` owns POV labels, POV label filtering, and POV camera/composition
|
||||
support text.
|
||||
- `krea_detail.py` owns generic detail-clause splitting, deduping, joining, and
|
||||
density limiting for Krea action prose.
|
||||
- `krea_pov_actions.py` owns POV hardcore action sentence rewriting and
|
||||
first-person body geometry.
|
||||
|
||||
Improve later:
|
||||
|
||||
- split semantic blocks into modules:
|
||||
`krea_actions.py`, `krea_pov_actions.py`;
|
||||
- split the remaining non-POV hardcore action dispatcher into `krea_actions.py`;
|
||||
- add route-level smoke fixtures for representative metadata rows;
|
||||
- make `_hardcore_action_sentence` dispatch by action family instead of long
|
||||
conditional chains.
|
||||
@@ -282,7 +285,7 @@ Near-term:
|
||||
Medium-term:
|
||||
|
||||
- Dispatch action rewriting by action family.
|
||||
- Split Krea semantic helpers into smaller modules.
|
||||
- Continue splitting remaining Krea semantic helpers into smaller modules.
|
||||
|
||||
### SDXL
|
||||
|
||||
@@ -336,7 +339,7 @@ Medium-term:
|
||||
|
||||
## Recommended Next Passes
|
||||
|
||||
1. Split Krea action/POV helpers into separate modules, using
|
||||
1. Split the remaining Krea action dispatcher into `krea_actions.py`, using
|
||||
`krea_cast.py` as the pattern for stable import aliases and smoke coverage.
|
||||
2. Split `__init__.py` node classes by family after behavior is covered by smoke
|
||||
checks.
|
||||
|
||||
@@ -84,7 +84,7 @@ These recipes identify the intended road before editing prompt text.
|
||||
| --- | --- | --- | --- |
|
||||
| Keep character/location but change only sexual pose | `Global Seed` or fixed seed config -> builder/pair | Keep `person_seed` and `scene_seed` fixed; change `pose_seed` and usually `role_seed`; for hardcore categories check `content_seed_axis` | `sexual_poses.json`, `hardcore_position_config`, Krea `_hardcore_action_sentence` |
|
||||
| Generate a specific hardcore oral/blowjob scene | `Hardcore Position Pool` -> `Hardcore Action Filter` -> `Insta/OF Prompt Pair` or `Prompt Builder` | Use `focus=oral_only` or disable non-oral families; keep `allow_oral=true`; constrain position pool to kneeling/standing/oral variants when needed | `sexual_poses.json` oral subcategory/templates, `_apply_hardcore_position_config_to_subcategory`, `_hardcore_action_sentence` |
|
||||
| Generate POV oral or POV penetration | `Man Slot` with POV presence -> `character_cast` -> pair/builder -> Krea2 formatter | POV man must be in the cast; use metadata into Krea2; normal camera directive is suppressed by POV | `_pov_hardcore_pose_sentence`, `_pov_action_phrase`, `krea_cast.cast_prose` omit-label handling |
|
||||
| Generate POV oral or POV penetration | `Man Slot` with POV presence -> `character_cast` -> pair/builder -> Krea2 formatter | POV man must be in the cast; use metadata into Krea2; normal camera directive is suppressed by POV | `krea_pov_actions.py`, `krea_pov.py`, `krea_cast.cast_prose` omit-label handling |
|
||||
| Generate porn-scene interaction beats | `Hardcore Position Pool` -> `Hardcore Action Filter` -> pair/builder | Use `focus=interaction_only` for kissing/body worship/transitions/guidance/camera/watching/aftercare, or `focus=manual_only` for fingering/clit/manual stimulation; constrain keys such as `camera_showing`, `wrist_pinning`, `fingering`, `aftercare` | `sexual_poses.json` interaction/manual subcategories, `_role_graph`, Krea `_is_foreplay_text` / `_hardcore_action_sentence` |
|
||||
| Same woman, same room, softcore and hardcore outputs | `Character Slot/Profile` -> `Insta/OF Options` -> `Insta/OF Prompt Pair` | `continuity=same_creator_same_room`; set `softcore_cast` as needed; use pair metadata into formatter | `build_insta_of_pair`, `softcore_row`, `hardcore_row`, pair metadata fields |
|
||||
| Same cast in softcore and hardcore | Character slot chain -> `Insta/OF Options` | `softcore_cast=same_as_hardcore`; configure partner slots/outfits if needed | `_insta_of_partner_styling`, character slot clothing, pair Krea branch |
|
||||
@@ -275,7 +275,8 @@ Edit targets:
|
||||
`camera_performance`, `group_coordination`, and `aftercare_cleanup`.
|
||||
- Position filtering UI: `build_hardcore_position_pool_json`,
|
||||
`build_hardcore_action_filter_json`, `_apply_hardcore_position_config_to_subcategory`.
|
||||
- Krea2 action rewrite, POV position rewrite, cleanup: `krea_formatter.py`.
|
||||
- Krea2 action rewrite orchestration: `krea_formatter.py`.
|
||||
- Krea2 POV position rewrite: `krea_pov_actions.py`.
|
||||
|
||||
### Composition
|
||||
|
||||
@@ -460,8 +461,9 @@ What each part owns:
|
||||
- `sexual_poses.json`: available positions, families, action templates, role
|
||||
graph templates, interaction templates, and action-specific pool references.
|
||||
- `prompt_builder.py`: filters which templates/axes remain available.
|
||||
- `krea_formatter.py`: rewrites the selected action into model-readable prose,
|
||||
including POV variants and cleanup.
|
||||
- `krea_formatter.py`: orchestrates the selected action rewrite into
|
||||
model-readable prose.
|
||||
- `krea_pov_actions.py`: rewrites POV variants with first-person geometry.
|
||||
|
||||
Current broad hardcore families:
|
||||
|
||||
@@ -549,8 +551,9 @@ Key Krea2 ownership:
|
||||
`krea_cast.natural_label_text`.
|
||||
- Action context and family predicates: `krea_action_context.py`.
|
||||
- POV labels, filtering, and camera/composition support: `krea_pov.py`.
|
||||
- Detail clause splitting and density limiting: `krea_detail.py`.
|
||||
- Hardcore action sentence: `_hardcore_action_sentence`.
|
||||
- POV hardcore sentence: `_pov_hardcore_pose_sentence`, `_pov_action_phrase`.
|
||||
- POV hardcore sentence: `krea_pov_actions.pov_action_phrase`.
|
||||
- Clothing state cleanup: `krea_clothing.natural_clothing_state`.
|
||||
- Camera scene preservation: `_camera_scene_phrase`.
|
||||
|
||||
@@ -559,9 +562,9 @@ Krea2 field consumption:
|
||||
| Branch | Reads most from | Key functions |
|
||||
| --- | --- | --- |
|
||||
| Normal single row | `subject_type`, `item`, `pose`, `scene_text`, `expression`, `composition`, `camera_*`, style fields | `_normal_row_to_krea` |
|
||||
| Normal configured cast/hardcore row | `cast_descriptor_text`, `women_count`, `men_count`, `source_role_graph`, `role_graph`, `item`, `item_axis_values`, `source_composition`, `pov_character_labels` | `_normal_row_to_krea`, `_hardcore_action_sentence`, `_pov_action_phrase` |
|
||||
| Normal configured cast/hardcore row | `cast_descriptor_text`, `women_count`, `men_count`, `source_role_graph`, `role_graph`, `item`, `item_axis_values`, `source_composition`, `pov_character_labels` | `_normal_row_to_krea`, `_hardcore_action_sentence`, `krea_pov_actions.pov_action_phrase` |
|
||||
| Insta/OF pair softcore | `shared_descriptor`, `softcore_row`, `softcore_partner_styling`, options, soft camera fields | `_insta_pair_to_krea` |
|
||||
| Insta/OF pair hardcore | `hardcore_row`, `shared_cast_descriptors`, `hardcore_clothing_state`, `hardcore_detail_density`, hard camera fields, POV labels | `_insta_pair_to_krea`, `_hardcore_action_sentence`, `_pov_action_phrase`, `krea_clothing.natural_clothing_state` |
|
||||
| Insta/OF pair hardcore | `hardcore_row`, `shared_cast_descriptors`, `hardcore_clothing_state`, `hardcore_detail_density`, hard camera fields, POV labels | `_insta_pair_to_krea`, `_hardcore_action_sentence`, `krea_pov_actions.pov_action_phrase`, `krea_clothing.natural_clothing_state` |
|
||||
| Plain text fallback | `source_text` only | `_fallback_text_to_krea` |
|
||||
|
||||
If metadata is connected and `method` says `text(fallback)`, the formatter did
|
||||
@@ -712,8 +715,8 @@ pair metadata through the core Python APIs, then verifies:
|
||||
| Same hardcore action repeats | Hardcore filter config, `sexual_poses.json` weights, `_apply_hardcore_position_config_to_subcategory`. |
|
||||
| Hardcore interaction beat falls back to penetration/oral | `sexual_poses.json` interaction subcategory, `_role_graph`, and Krea `_is_foreplay_text` / `_hardcore_pose_anchor`. |
|
||||
| Raw hardcore prompt position is vague | `sexual_poses.json` item templates and role graph templates. |
|
||||
| Krea2 hardcore prompt position is vague | `_hardcore_action_sentence` or `_pov_hardcore_pose_sentence`. |
|
||||
| Man appears described in POV | POV labels, `_cast_prose` omit labels, `_pov_action_phrase`. |
|
||||
| Krea2 hardcore prompt position is vague | `_hardcore_action_sentence` or `krea_pov_actions.py`. |
|
||||
| Man appears described in POV | POV labels, `krea_cast.cast_prose` omit labels, `krea_pov_actions.pov_action_phrase`. |
|
||||
| Camera prompt missing from Krea2 | Row `camera_directive` / `camera_scene_directive`, then Krea `_camera_phrase`. |
|
||||
| Trigger missing in Krea2 fallback | `format_krea2_prompt` preserve-trigger fallback behavior. |
|
||||
| SDXL tags too weak/wrong style | `sdxl_formatter.py` presets and `_row_core_tags` / `_soft_tags` / `_hard_tags`. |
|
||||
@@ -747,8 +750,7 @@ Use these traces to narrow a problem in one pass.
|
||||
`item_axis_values`.
|
||||
4. Inspect `krea_pov.py` if the label omission, camera phrase, or POV
|
||||
composition cleanup is wrong.
|
||||
5. Edit `_pov_hardcore_pose_sentence` if the first-person body geometry is
|
||||
wrong.
|
||||
5. Edit `krea_pov_actions.py` if the first-person body geometry is wrong.
|
||||
6. Edit `sexual_poses.json` if the raw action lacks enough body-position anchor
|
||||
for any formatter to infer a good POV prompt.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user