Extract Krea pair formatter route

This commit is contained in:
2026-06-27 11:09:59 +02:00
parent 8398a97cdf
commit 176d4c9257
5 changed files with 287 additions and 162 deletions
+5 -1
View File
@@ -329,12 +329,16 @@ Owner: `krea_formatter.py`.
Keep here:
- Krea prose style;
- Krea route orchestration;
- Krea top-level route orchestration;
- camera-scene preservation;
- fallback text parsing.
Already isolated:
- `krea_pair_formatter.py` owns Insta/OF pair soft/hard Krea prose assembly
behind `KreaPairFormatRequest`, `KreaPairFormatDependencies`, and
`KreaPairPrompts`; `krea_formatter.py` keeps the `_insta_pair_to_krea`
compatibility wrapper.
- `krea_cast.py` owns cast descriptor parsing, cast labels, cast prose, label
joining, natural cast descriptor text, and label replacement for formatter
routes, including the caption naturalizer's cast metadata path.
+6 -3
View File
@@ -648,7 +648,8 @@ Important POV rule:
`format_krea2_prompt` chooses between three roads:
- Pair metadata: `_insta_pair_to_krea`.
- Pair metadata: `krea_pair_formatter.format_insta_pair_result` through the
`_insta_pair_to_krea` compatibility wrapper.
- Normal metadata row: `_normal_row_to_krea`.
- Plain text fallback: `_fallback_text_to_krea`.
@@ -663,6 +664,8 @@ Key Krea2 ownership:
- Climax role/detail cleanup: `krea_action_climax.py`.
- Non-POV action-family routing: `krea_action_dispatch.py`.
- Non-POV hardcore action sentence: `krea_actions.hardcore_action_sentence`.
- Insta/OF pair soft/hard Krea prose assembly:
`krea_pair_formatter.format_insta_pair_result`.
- Shared POV labels/filtering/composition cleanup: `pov_policy.py`.
- Krea POV camera support: `krea_pov.py`.
- Detail clause splitting and density limiting: `krea_detail.py`.
@@ -676,8 +679,8 @@ Krea2 field consumption:
| --- | --- | --- |
| 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`, `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 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` |
| Insta/OF pair softcore | `shared_descriptor`, `softcore_row`, `softcore_partner_styling`, options, soft camera fields | `krea_pair_formatter.format_insta_pair_result` |
| Insta/OF pair hardcore | `hardcore_row`, `shared_cast_descriptors`, `hardcore_clothing_state`, `hardcore_detail_density`, hard camera fields, POV labels | `krea_pair_formatter.format_insta_pair_result`, `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` |
If metadata is connected and `method` says `text(fallback)`, the formatter did