mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
fix(caption): address PR review feedback
- Remove superfluous SimpleNamespace import in cli/api-caption.py, use Map instead - Drop _ prefix from internal helper functions in modules/api/caption.py - Move DeepDanbooru model path to top-level models folder instead of nesting under CLIP
This commit is contained in:
+1
-2
@@ -8,7 +8,6 @@ import base64
|
||||
import sys
|
||||
import os
|
||||
import asyncio
|
||||
from types import SimpleNamespace
|
||||
import filetype
|
||||
from PIL import Image
|
||||
from util import log, Map
|
||||
@@ -67,7 +66,7 @@ async def caption(f):
|
||||
else:
|
||||
log.error({ 'caption clip error': res })
|
||||
# run tagger (DeepBooru)
|
||||
tagger_req = SimpleNamespace(image=json.image, model='deepbooru', show_scores=True)
|
||||
tagger_req = Map({'image': json.image, 'model': 'deepbooru', 'show_scores': True})
|
||||
res = await sdapi.post('/sdapi/v1/tagger', tagger_req)
|
||||
keywords = {}
|
||||
if 'scores' in res and res.scores:
|
||||
|
||||
Reference in New Issue
Block a user