Centralize formatter route metadata

This commit is contained in:
2026-06-27 02:24:30 +02:00
parent 7d112c0f98
commit c0c2fb2b40
8 changed files with 115 additions and 29 deletions
+11 -3
View File
@@ -188,6 +188,10 @@ Already isolated:
rows now emit `action_family`, `position_family`, `position_key`, and
`position_keys` so formatter routing and debugging do less keyword guessing.
Krea, SDXL, and training-caption routes consume these fields when present.
- shared row route metadata readers live in `route_metadata.py`, covering
normalized action family, position family/keys, and route-specific formatter
hints for Krea, SDXL, and training-caption routes. Position keys are strict
by default, while SDXL can opt into legacy unknown key tags for compatibility.
- final row and pair text normalization lives in `row_normalization.py`,
covering trigger prepending, extra-positive append, negative merge/dedupe,
caption-part joining, and embedded soft/hard row sanitation before metadata
@@ -270,12 +274,14 @@ Already isolated:
stripping, the shared prompt field-label inventory, prompt-field extraction,
`Avoid:` splitting, and row-value fallback for Krea, SDXL, and caption
routes.
- `route_metadata.py` owns shared row-level action-family, position-family,
position-key, and formatter-hint reads so formatter routes do not normalize
these fields independently.
Improve later:
- extend SDXL and caption routes to optionally consume `action_family` /
`position_family` when ordering tags or caption clauses;
- add route-level smoke fixtures for representative metadata rows;
- keep adding route-level smoke fixtures when new metadata fields start
influencing formatter output;
### SDXL Formatter Path
@@ -290,6 +296,7 @@ Keep here:
- negative-prompt assembly.
- metadata-family tag hints from `action_family`, `position_family`, and
`position_keys`.
- shared row route metadata reads from `route_metadata.py`.
- shared formatter input parsing from `formatter_input.py`.
- style presets, quality presets, default negative prompt, and action/position
family tag hints from `sdxl_presets.py`.
@@ -313,6 +320,7 @@ Keep here:
- style-tail policy from `caption_policy.py`.
- metadata-family action labels from `action_family` and `position_family` via
`caption_policy.py`.
- shared row route metadata reads from `route_metadata.py`.
- shared formatter input parsing from `formatter_input.py`.
- shared cast descriptor parsing and label replacement from `krea_cast.py`.
- caption detail-level/style-policy normalization, clothing cleanup, and
+1
View File
@@ -92,6 +92,7 @@ Core helper ownership:
| `hardcore_role_anal.py` | Anal and double-contact role graph wording for rear-entry, raised-edge, kneeling, side-lying, and front/back double-position geometry. |
| `hardcore_role_climax.py` | Climax and ejaculation aftermath role graph wording for face/body/ass, lap, open-thigh, side-lying, and group front/back placement. |
| `hardcore_action_metadata.py` | Source action-family and position-family metadata used by Krea2, SDXL, and caption routes. |
| `route_metadata.py` | Shared row-level route metadata readers for normalized action family, position family/keys, and formatter hints used by Krea2, SDXL, and caption routes. |
| `scene_camera_adapters.py` | Location-aware camera/scene prose such as coworking lounge camera layout. |
| `krea_cast.py` | Shared formatter cast descriptor parsing, cast labels, cast prose, natural cast descriptor text, and label replacement used by Krea2 and caption routes. |
| `prompt_hygiene.py` | Generic prompt, caption, and negative-prompt cleanup. |