mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-17 23:41:28 +00:00
Add global specialist caption override
This commit is contained in:
@@ -212,20 +212,29 @@ class CaptionJobManager:
|
||||
try:
|
||||
self._progress({"stage": "routing"})
|
||||
|
||||
# The router uses the local GPU. Block SigLIP searches/indexing only
|
||||
# for this stage; the actual VLM caption requests run on Ollama.
|
||||
self._set_gpu_busy(True)
|
||||
try:
|
||||
with self.search_service.model_lock:
|
||||
with FrameSource() as frame_source:
|
||||
routed, missing = _route_rows(
|
||||
rows,
|
||||
progress=self._progress,
|
||||
frame_source=frame_source,
|
||||
before_batch=lambda: self._wait_if_paused("routing"),
|
||||
)
|
||||
finally:
|
||||
self._set_gpu_busy(False)
|
||||
# The normal router uses the local GPU. A global specialist
|
||||
# override has no classifier work, so do not block semantic search.
|
||||
if settings.caption_force_specialist:
|
||||
with FrameSource() as frame_source:
|
||||
routed, missing = _route_rows(
|
||||
rows,
|
||||
progress=self._progress,
|
||||
frame_source=frame_source,
|
||||
before_batch=lambda: self._wait_if_paused("routing"),
|
||||
)
|
||||
else:
|
||||
self._set_gpu_busy(True)
|
||||
try:
|
||||
with self.search_service.model_lock:
|
||||
with FrameSource() as frame_source:
|
||||
routed, missing = _route_rows(
|
||||
rows,
|
||||
progress=self._progress,
|
||||
frame_source=frame_source,
|
||||
before_batch=lambda: self._wait_if_paused("routing"),
|
||||
)
|
||||
finally:
|
||||
self._set_gpu_busy(False)
|
||||
|
||||
if not routed:
|
||||
self._progress(
|
||||
|
||||
Reference in New Issue
Block a user