mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-17 07:21:28 +00:00
Configure dual caption models and routing policy
This commit is contained in:
+35
-3
@@ -21,15 +21,47 @@ class Settings:
|
||||
batch_size: int = int(os.getenv("BATCH_SIZE", "8"))
|
||||
|
||||
ollama_url: str = os.getenv("OLLAMA_URL", "http://127.0.0.1:11434").rstrip("/")
|
||||
caption_model: str = os.getenv(
|
||||
"CAPTION_MODEL",
|
||||
"huihui_ai/qwen3-vl-abliterated:4b-instruct-q4_K_M",
|
||||
caption_general_model: str = os.getenv(
|
||||
"CAPTION_GENERAL_MODEL",
|
||||
os.getenv(
|
||||
"CAPTION_MODEL",
|
||||
"huihui_ai/qwen3-vl-abliterated:4b-instruct-q4_K_M",
|
||||
),
|
||||
)
|
||||
caption_specialist_model: str = os.getenv(
|
||||
"CAPTION_SPECIALIST_MODEL",
|
||||
"aha2025/llama-joycaption-beta-one-hf-llava:Q4_K_M",
|
||||
)
|
||||
caption_timeout_seconds: int = int(os.getenv("CAPTION_TIMEOUT_SECONDS", "180"))
|
||||
caption_max_tokens: int = int(os.getenv("CAPTION_MAX_TOKENS", "120"))
|
||||
caption_prompt_file: Path = Path(
|
||||
os.getenv("CAPTION_PROMPT_FILE", "./data/caption_prompt.txt")
|
||||
).expanduser().resolve()
|
||||
caption_specialist_prompt_file: Path = Path(
|
||||
os.getenv(
|
||||
"CAPTION_SPECIALIST_PROMPT_FILE",
|
||||
"./data/caption_prompt_specialist.txt",
|
||||
)
|
||||
).expanduser().resolve()
|
||||
|
||||
caption_router_enabled: bool = os.getenv(
|
||||
"CAPTION_ROUTER_ENABLED", "true"
|
||||
).strip().lower() not in {"0", "false", "no", "off"}
|
||||
caption_router_model: str = os.getenv(
|
||||
"CAPTION_ROUTER_MODEL", "Falconsai/nsfw_image_detection"
|
||||
)
|
||||
caption_router_device: str = os.getenv(
|
||||
"CAPTION_ROUTER_DEVICE", os.getenv("DEVICE", "cuda")
|
||||
)
|
||||
caption_router_batch_size: int = int(
|
||||
os.getenv("CAPTION_ROUTER_BATCH_SIZE", "32")
|
||||
)
|
||||
caption_router_threshold: float = float(
|
||||
os.getenv("CAPTION_ROUTER_THRESHOLD", "0.50")
|
||||
)
|
||||
caption_router_context_seconds: float = float(
|
||||
os.getenv("CAPTION_ROUTER_CONTEXT_SECONDS", "6")
|
||||
)
|
||||
|
||||
data_dir: Path = Path(os.getenv("DATA_DIR", "./data")).resolve()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user