Extract SDXL tag route assembly

This commit is contained in:
2026-06-27 11:26:07 +02:00
parent 09fc31f078
commit 0ccb87799b
5 changed files with 281 additions and 103 deletions
+9 -2
View File
@@ -396,9 +396,16 @@ Keep here:
- trigger behavior;
- style and quality presets;
- tag ordering;
- weighted explicit tags;
- final style/body/quality prompt assembly;
- nude-weight setting and explicit-tag helper policy;
- negative-prompt assembly.
Already isolated:
- `sdxl_tag_routes.py` owns normal metadata row tags and Insta/OF pair soft/hard
tag extraction behind `SDXLRowTagRequest`, `SDXLPairTagRequest`,
`SDXLTagRouteDependencies`, and `SDXLTagRoute`; `sdxl_formatter.py` keeps
compatibility wrappers plus final style/quality/trigger assembly.
- metadata-family tag hints from `action_family`, `position_family`, and
`position_keys`.
- shared row route metadata reads from `route_metadata.py`.
+7 -5
View File
@@ -699,8 +699,10 @@ not parse metadata. That is a wiring/input-hint issue, not a prompt pool issue.
`format_sdxl_prompt` chooses between:
- Pair metadata: `_soft_tags` and `_hard_tags`.
- Normal metadata row: `_row_core_tags`.
- Pair metadata: `sdxl_tag_routes.soft_tags_result` and
`sdxl_tag_routes.hard_tags_result` through compatibility wrappers.
- Normal metadata row: `sdxl_tag_routes.row_core_tags_result` through the
`_row_core_tags` compatibility wrapper.
- Plain text fallback: `_fallback_text_to_sdxl`.
Use this route for style triggers, weighted tag style, nude weighting, formatter
@@ -710,9 +712,9 @@ SDXL field consumption:
| Branch | Reads most from | Key functions |
| --- | --- | --- |
| Normal metadata | cast descriptors, age/body/skin/hair/eyes, `action_family`, `position_family`, `position_keys`, item, role graph, scene, camera config/directive | `_row_core_tags`, `_metadata_family_tags`, `_camera_tags` |
| Pair softcore | `softcore_row`, pair partner styling, root soft camera config | `_soft_tags` |
| Pair hardcore | `hardcore_row`, `action_family`, `position_family`, `position_keys`, `hardcore_clothing_state`, hard camera fields, hard prompt text | `_hard_tags`, `_metadata_family_tags` |
| Normal metadata | cast descriptors, age/body/skin/hair/eyes, `action_family`, `position_family`, `position_keys`, item, role graph, scene, camera config/directive | `sdxl_tag_routes.row_core_tags_result`, `_metadata_family_tags`, `_camera_tags` |
| Pair softcore | `softcore_row`, pair partner styling, root soft camera config | `sdxl_tag_routes.soft_tags_result` |
| Pair hardcore | `hardcore_row`, `action_family`, `position_family`, `position_keys`, `hardcore_clothing_state`, hard camera fields, hard prompt text | `sdxl_tag_routes.hard_tags_result`, `_metadata_family_tags` |
| Text fallback | `source_text`, preserve-trigger setting, shared field-label stripping | `_fallback_text_to_sdxl` |
SDXL is the right place for model trigger handling, tag ordering, weight syntax,