Extract Krea hardcore action helpers
This commit is contained in:
@@ -136,7 +136,6 @@ Keep here:
|
|||||||
|
|
||||||
- Krea prose style;
|
- Krea prose style;
|
||||||
- Krea route orchestration;
|
- Krea route orchestration;
|
||||||
- remaining hardcore action sentence dispatch;
|
|
||||||
- camera-scene preservation;
|
- camera-scene preservation;
|
||||||
- fallback text parsing.
|
- fallback text parsing.
|
||||||
|
|
||||||
@@ -153,15 +152,17 @@ Already isolated:
|
|||||||
support text.
|
support text.
|
||||||
- `krea_detail.py` owns generic detail-clause splitting, deduping, joining, and
|
- `krea_detail.py` owns generic detail-clause splitting, deduping, joining, and
|
||||||
density limiting for Krea action prose.
|
density limiting for Krea action prose.
|
||||||
|
- `krea_actions.py` owns non-POV hardcore action sentence rewriting, pose
|
||||||
|
anchors, arrangements, climax detail cleanup, and action-position phrasing.
|
||||||
- `krea_pov_actions.py` owns POV hardcore action sentence rewriting and
|
- `krea_pov_actions.py` owns POV hardcore action sentence rewriting and
|
||||||
first-person body geometry.
|
first-person body geometry.
|
||||||
|
|
||||||
Improve later:
|
Improve later:
|
||||||
|
|
||||||
- split the remaining non-POV hardcore action dispatcher into `krea_actions.py`;
|
- split `krea_actions.py` by action family once the extracted module is stable;
|
||||||
- add route-level smoke fixtures for representative metadata rows;
|
- add route-level smoke fixtures for representative metadata rows;
|
||||||
- make `_hardcore_action_sentence` dispatch by action family instead of long
|
- make `krea_actions.hardcore_action_sentence` dispatch by action family instead
|
||||||
conditional chains.
|
of long conditional chains.
|
||||||
|
|
||||||
### SDXL Formatter Path
|
### SDXL Formatter Path
|
||||||
|
|
||||||
@@ -339,8 +340,8 @@ Medium-term:
|
|||||||
|
|
||||||
## Recommended Next Passes
|
## Recommended Next Passes
|
||||||
|
|
||||||
1. Split the remaining Krea action dispatcher into `krea_actions.py`, using
|
1. Split `krea_actions.py` by action family, using `krea_cast.py` as the
|
||||||
`krea_cast.py` as the pattern for stable import aliases and smoke coverage.
|
pattern for stable import aliases and smoke coverage.
|
||||||
2. Split `__init__.py` node classes by family after behavior is covered by smoke
|
2. Split `__init__.py` node classes by family after behavior is covered by smoke
|
||||||
checks.
|
checks.
|
||||||
3. Add metadata fields such as `action_family` / `position_family` to reduce
|
3. Add metadata fields such as `action_family` / `position_family` to reduce
|
||||||
|
|||||||
@@ -82,10 +82,10 @@ These recipes identify the intended road before editing prompt text.
|
|||||||
|
|
||||||
| Request | Preferred node route | Critical settings | If wrong, inspect |
|
| Request | Preferred node route | Critical settings | If wrong, inspect |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| 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` |
|
| 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_actions.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 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`, `krea_actions.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 | `krea_pov_actions.py`, `krea_pov.py`, `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` |
|
| 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_action_context.is_foreplay_text` / `krea_actions.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 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 |
|
| 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 |
|
||||||
| Change only outfit/clothing | Character clothing or category content route | Keep `person_seed`, `scene_seed`, `pose_seed`; change `content_seed`; slot `softcore_outfit` overrides Insta/OF outfit | `SxCP Character Clothing`, `INSTA_OF_SOFTCORE_OUTFITS`, category item templates |
|
| Change only outfit/clothing | Character clothing or category content route | Keep `person_seed`, `scene_seed`, `pose_seed`; change `content_seed`; slot `softcore_outfit` overrides Insta/OF outfit | `SxCP Character Clothing`, `INSTA_OF_SOFTCORE_OUTFITS`, category item templates |
|
||||||
@@ -276,6 +276,7 @@ Edit targets:
|
|||||||
- Position filtering UI: `build_hardcore_position_pool_json`,
|
- Position filtering UI: `build_hardcore_position_pool_json`,
|
||||||
`build_hardcore_action_filter_json`, `_apply_hardcore_position_config_to_subcategory`.
|
`build_hardcore_action_filter_json`, `_apply_hardcore_position_config_to_subcategory`.
|
||||||
- Krea2 action rewrite orchestration: `krea_formatter.py`.
|
- Krea2 action rewrite orchestration: `krea_formatter.py`.
|
||||||
|
- Krea2 non-POV action rewrite: `krea_actions.py`.
|
||||||
- Krea2 POV position rewrite: `krea_pov_actions.py`.
|
- Krea2 POV position rewrite: `krea_pov_actions.py`.
|
||||||
|
|
||||||
### Composition
|
### Composition
|
||||||
@@ -463,6 +464,8 @@ What each part owns:
|
|||||||
- `prompt_builder.py`: filters which templates/axes remain available.
|
- `prompt_builder.py`: filters which templates/axes remain available.
|
||||||
- `krea_formatter.py`: orchestrates the selected action rewrite into
|
- `krea_formatter.py`: orchestrates the selected action rewrite into
|
||||||
model-readable prose.
|
model-readable prose.
|
||||||
|
- `krea_actions.py`: rewrites non-POV hardcore action sentences, pose anchors,
|
||||||
|
arrangements, detail dedupe, and climax cleanup.
|
||||||
- `krea_pov_actions.py`: rewrites POV variants with first-person geometry.
|
- `krea_pov_actions.py`: rewrites POV variants with first-person geometry.
|
||||||
|
|
||||||
Current broad hardcore families:
|
Current broad hardcore families:
|
||||||
@@ -550,9 +553,9 @@ Key Krea2 ownership:
|
|||||||
- Cast descriptor naturalization: `krea_cast.cast_prose`,
|
- Cast descriptor naturalization: `krea_cast.cast_prose`,
|
||||||
`krea_cast.natural_label_text`.
|
`krea_cast.natural_label_text`.
|
||||||
- Action context and family predicates: `krea_action_context.py`.
|
- Action context and family predicates: `krea_action_context.py`.
|
||||||
|
- Non-POV hardcore action sentence: `krea_actions.hardcore_action_sentence`.
|
||||||
- POV labels, filtering, and camera/composition support: `krea_pov.py`.
|
- POV labels, filtering, and camera/composition support: `krea_pov.py`.
|
||||||
- Detail clause splitting and density limiting: `krea_detail.py`.
|
- Detail clause splitting and density limiting: `krea_detail.py`.
|
||||||
- Hardcore action sentence: `_hardcore_action_sentence`.
|
|
||||||
- POV hardcore sentence: `krea_pov_actions.pov_action_phrase`.
|
- POV hardcore sentence: `krea_pov_actions.pov_action_phrase`.
|
||||||
- Clothing state cleanup: `krea_clothing.natural_clothing_state`.
|
- Clothing state cleanup: `krea_clothing.natural_clothing_state`.
|
||||||
- Camera scene preservation: `_camera_scene_phrase`.
|
- Camera scene preservation: `_camera_scene_phrase`.
|
||||||
@@ -562,9 +565,9 @@ Krea2 field consumption:
|
|||||||
| Branch | Reads most from | Key functions |
|
| 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 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`, `krea_pov_actions.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`, `krea_actions.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 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`, `krea_pov_actions.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`, `krea_actions.hardcore_action_sentence`, `krea_pov_actions.pov_action_phrase`, `krea_clothing.natural_clothing_state` |
|
||||||
| Plain text fallback | `source_text` only | `_fallback_text_to_krea` |
|
| Plain text fallback | `source_text` only | `_fallback_text_to_krea` |
|
||||||
|
|
||||||
If metadata is connected and `method` says `text(fallback)`, the formatter did
|
If metadata is connected and `method` says `text(fallback)`, the formatter did
|
||||||
@@ -713,9 +716,9 @@ pair metadata through the core Python APIs, then verifies:
|
|||||||
| Wrong expression intensity | Character slot expression settings, `_expression_entries_for_intensity`, expression pools. |
|
| Wrong expression intensity | Character slot expression settings, `_expression_entries_for_intensity`, expression pools. |
|
||||||
| Expression appears when disabled | `_disable_row_expression`, formatter expression extraction. |
|
| Expression appears when disabled | `_disable_row_expression`, formatter expression extraction. |
|
||||||
| Same hardcore action repeats | Hardcore filter config, `sexual_poses.json` weights, `_apply_hardcore_position_config_to_subcategory`. |
|
| 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`. |
|
| Hardcore interaction beat falls back to penetration/oral | `sexual_poses.json` interaction subcategory, `_role_graph`, and `krea_action_context.is_foreplay_text` / `krea_actions.hardcore_pose_anchor`. |
|
||||||
| Raw hardcore prompt position is vague | `sexual_poses.json` item templates and role graph templates. |
|
| 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 `krea_pov_actions.py`. |
|
| Krea2 hardcore prompt position is vague | `krea_actions.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`. |
|
| 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`. |
|
| 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. |
|
| Trigger missing in Krea2 fallback | `format_krea2_prompt` preserve-trigger fallback behavior. |
|
||||||
@@ -738,9 +741,8 @@ Use these traces to narrow a problem in one pass.
|
|||||||
3. Inspect `categories/sexual_poses.json` for the selected subcategory,
|
3. Inspect `categories/sexual_poses.json` for the selected subcategory,
|
||||||
`item_templates`, `axes`, and `weight`.
|
`item_templates`, `axes`, and `weight`.
|
||||||
4. If raw `item` differs but Krea output looks identical, inspect
|
4. If raw `item` differs but Krea output looks identical, inspect
|
||||||
`krea_action_context.py` family predicates first, then
|
`krea_action_context.py` family predicates first, then `krea_actions.py`
|
||||||
`_hardcore_pose_anchor`, `_hardcore_pose_arrangement`,
|
pose anchors, arrangements, item detail cleanup, and action sentence dispatch.
|
||||||
`_hardcore_item_detail`, and `_hardcore_action_sentence`.
|
|
||||||
|
|
||||||
### POV position is spatially wrong
|
### POV position is spatially wrong
|
||||||
|
|
||||||
|
|||||||
+1118
File diff suppressed because it is too large
Load Diff
+6
-1095
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user