Extract server route payload handlers
This commit is contained in:
@@ -416,13 +416,17 @@ Already isolated:
|
||||
by `__init__.py`.
|
||||
- generation profile, advanced filter, and ethnicity list utility nodes live in
|
||||
`node_profile_filter.py`, with registration maps imported by `__init__.py`.
|
||||
- profile-save and accumulator server payload handling lives in
|
||||
`server_routes.py`; `__init__.py` only wires those pure handlers to ComfyUI
|
||||
JSON responses, and `tools/prompt_smoke.py` covers the handlers without
|
||||
importing ComfyUI.
|
||||
|
||||
Improve later:
|
||||
|
||||
- split remaining large node classes into files by family;
|
||||
- keep node display names, return names, and docs in sync through the audit
|
||||
helper;
|
||||
- add small endpoint tests for profile/accumulator/index-switch routes.
|
||||
- add more endpoint tests when new server routes are introduced.
|
||||
|
||||
## Path-Specific Improvements
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ Core helper ownership:
|
||||
| `prompt_hygiene.py` | Generic prompt, caption, and negative-prompt cleanup. |
|
||||
| `row_normalization.py` | Final prompt-row and pair metadata normalization: trigger prepending, extra-positive append, negative merge/dedupe, caption-part joining, embedded soft/hard row output and side-metadata synchronization, and embedded row sanitation. |
|
||||
| `formatter_input.py` | Shared formatter input parsing: text cleanup, metadata/source JSON detection, trigger-prefix stripping, shared prompt field-label inventory, fallback field-label stripping, `Avoid:` splitting, prompt-field extraction, and metadata row-value fallback. |
|
||||
| `server_routes.py` | Pure payload handlers for profile-save and accumulator server endpoints, used by ComfyUI routes and smoke tests without importing ComfyUI. |
|
||||
| `sdxl_presets.py` | SDXL formatter profiles, style presets, quality presets, default negative prompt, and metadata-family tag hints used by the SDXL formatter and node choice lists. |
|
||||
| `caption_policy.py` | Caption naturalizer policy data and helpers: caption profiles, style tails, item labels, metadata-family caption labels, detail/style-policy normalization, clothing cleanup, and composition cleanup. |
|
||||
|
||||
@@ -813,6 +814,9 @@ pair metadata through the core Python APIs, then verifies:
|
||||
- static formatter metadata fixtures keep source-provided action families
|
||||
stable across Krea2 prose, SDXL tags, and natural captions even when raw item
|
||||
text contains distracting wording.
|
||||
- profile-save and accumulator endpoint payload handlers are smoke-tested
|
||||
without importing ComfyUI, and the reversible index switch keeps pick/input
|
||||
and route/output behavior stable.
|
||||
|
||||
## Editing Cheatsheet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user