mirror of
https://github.com/vladmandic/automatic
synced 2026-08-28 08:00:59 +02:00
6c20e49897
Move all caption/interrogate/tagger/VQA API code out of the monolithic endpoints.py and models.py into a new self-contained modules/api/caption.py, following the loras.py / nudenet.py self-registering pattern. - Move 15 Pydantic models (ReqCaption, ResCaption, ReqVQA, ResVQA, ReqTagger, ResTagger, dispatch union types, etc.) from models.py - Move 11 handler functions from endpoints.py - Deduplicate ~150 lines via shared _do_openclip, _do_tagger, _do_vqa core functions called by both direct and dispatch endpoints - Add register_api() that registers all 8 caption routes - Add promptgen field to ResVLMPrompts (bug fix: handler returned it but response model silently dropped it) - Improve all endpoint docstrings and Field descriptions for API docs