Extract Insta pair output assembly

This commit is contained in:
2026-06-26 21:51:32 +02:00
parent 8bff345cf7
commit e1ec8bd823
5 changed files with 253 additions and 126 deletions
+4 -4
View File
@@ -147,14 +147,11 @@ Keep here:
- soft/hard row creation;
- continuity policy;
- softcore cast policy;
- pair metadata shape.
Improve later:
- make a single pair metadata sanitizer that normalizes `softcore_row`,
`hardcore_row`, pair prompts, negatives, captions, and camera fields;
- split pair assembly into small functions by phase:
`build_soft_row`, `build_hard_row`, `assemble_pair_metadata`.
`build_soft_row`, `build_hard_row`.
Already isolated:
@@ -166,6 +163,9 @@ Already isolated:
including action-aware body-access flags, conflicting outfit-piece cleanup,
default visible-men clothing, character-clothing override handling, and final
root clothing-state assembly.
- final pair output assembly lives in `pair_output.py`, including soft/hard
prompt strings, trigger preservation, negatives, captions, and root metadata
shape.
### Krea2 Formatter Path
+5 -4
View File
@@ -67,6 +67,7 @@ Core helper ownership:
| `category_library.py` | JSON category loading, subcategory normalization, named scene/expression/composition pool loading, cast compatibility filtering, exact subcategory lookup, and inheritance-based pool merging. |
| `pair_camera.py` | Insta/OF soft/hard camera route resolution, same-as-softcore camera mode, camera-detail override, camera-aware composition mutation, POV camera suppression, and synchronized row/root camera metadata. |
| `pair_clothing.py` | Insta/OF hardcore clothing continuity, action-aware body-access flags, conflicting outfit-piece cleanup, default visible-men clothing, and final root clothing-state assembly. |
| `pair_output.py` | Insta/OF final pair prompts, trigger preservation, negative prompts, captions, and root pair metadata assembly. |
| `hardcore_role_graphs.py` | Source role graph construction for hardcore configured-cast rows, including POV-aware interaction geometry. |
| `hardcore_role_fallback.py` | Solo, same-sex, mixed group fallback, and support-partner role graph wording for configured casts. |
| `hardcore_role_interaction.py` | Foreplay, manual stimulation, body worship, clothing transition, dominant guidance, camera performance, aftercare, and group coordination role graph wording. |
@@ -456,8 +457,8 @@ plain prompt text. When debugging, inspect these fields before editing pools.
| `shared_descriptor` | Soft row descriptor | Pair formatters | Primary creator descriptor. |
| `shared_cast_descriptors` | Cast descriptor builder | Pair formatters | Full cast descriptor list. |
| `softcore_row`, `hardcore_row` | Pair route | Pair formatters | Full normal metadata rows for each side. |
| `softcore_prompt`, `hardcore_prompt` | Pair assembly | Direct output/fallback | Raw pair prompts before formatter rewrite. |
| `softcore_negative_prompt`, `hardcore_negative_prompt` | Pair assembly | Formatter negatives | Separate negatives for each side. |
| `softcore_prompt`, `hardcore_prompt` | `pair_output.py` | Direct output/fallback | Raw pair prompts before formatter rewrite. |
| `softcore_negative_prompt`, `hardcore_negative_prompt` | `pair_output.py` | Formatter negatives | Separate negatives for each side. |
| `softcore_partner_styling` | `_insta_of_partner_styling` | Krea/SDXL pair branch | Partner softcore clothing and pose when same-cast softcore is enabled. |
| `character_hardcore_clothing` | Character slots | Krea pair branch | Explicit per-character hardcore clothing state. |
| `default_man_hardcore_clothing` | Pair fallback | Krea pair branch | Auto clothing for visible men without configured clothing. |
@@ -851,8 +852,8 @@ Use these traces to narrow a problem in one pass.
1. Check whether the prompt came from pair softcore or normal category builder.
2. In pair softcore, inspect `softcore_partner_styling`, `softcore_row.item`,
`softcore_row.pose`, and options `softcore_cast`.
3. If the raw soft prompt contains awkward defensive clauses, fix
`build_insta_of_pair` soft prompt assembly.
3. If the raw soft prompt contains awkward defensive clauses, inspect
`pair_output.py`.
4. If Krea adds the awkwardness, inspect `_insta_pair_to_krea`.
### Location composition mentions irrelevant props