refactor(api): update cli tools for DeepBooru tagger migration

- Update cli/api-interrogate.py to use /sdapi/v1/tagger for DeepBooru
- Handle tagger response format (scores dict or tags string)
- Remove DeepBooru test from interrogate endpoint tests
- Update API model descriptions to reference tagger for anime tagging
This commit is contained in:
CalamitousFelicitousness
2026-01-25 04:40:35 +00:00
parent 7825f44581
commit 83fa8e39ba
4 changed files with 23 additions and 59 deletions
+3 -3
View File
@@ -368,11 +368,11 @@ class ResStatus(BaseModel):
class ReqInterrogate(BaseModel):
"""Request model for OpenCLIP/BLIP image interrogation.
Analyze image using CLIP model via OpenCLIP to generate prompts,
or use DeepDanbooru for anime-style tagging.
Analyze image using CLIP model via OpenCLIP to generate prompts.
For anime-style tagging, use /sdapi/v1/tagger with WaifuDiffusion or DeepBooru.
"""
image: str = Field(default="", title="Image", description="Image to interrogate. Must be a Base64 encoded string containing the image data (PNG/JPEG).")
model: str = Field(default="ViT-L-14/openai", title="Model", description="OpenCLIP model to use. Use 'deepdanbooru' or 'deepbooru' for anime tagging. Get available models from GET /sdapi/v1/interrogate.")
model: str = Field(default="ViT-L-14/openai", title="Model", description="OpenCLIP model to use. Get available models from GET /sdapi/v1/interrogate.")
clip_model: str = Field(default="ViT-L-14/openai", title="CLIP Model", description="CLIP model used for image-text similarity matching. Larger models (ViT-L, ViT-H) are more accurate but slower and use more VRAM.")
blip_model: str = Field(default="blip-large", title="Caption Model", description="BLIP model used to generate the initial image caption. The caption model describes the image content which CLIP then enriches with style and flavor terms.")
mode: str = Field(default="best", title="Mode", description="Interrogation mode. Fast: Quick caption with minimal flavor terms. Classic: Standard interrogation with balanced quality and speed. Best: Most thorough analysis, slowest but highest quality. Negative: Generate terms to use as negative prompt.")