Configuration

Overview

This project is configured primarily through Python constants defined in indexer.py, api.py, and embedding_utils.py. There are no external environment files or .env support.

Paths

ConstantValueDescription
DB_PATH./.dbPersistent ChromaDB storage directory
THUMBNAIL_PATH./.cache/thumbnailsPre-computed thumbnail storage
MODEL_ID./Qwen/Qwen3-VL-Embedding-2BLocal model weights directory
HF_MODEL_IDQwen/Qwen3-VL-Embedding-2BHuggingFace Hub model identifier

Embedding Settings

ConstantDefaultDescription
MAX_LENGTH8192Maximum token sequence length
MIN_PIXELS4096Minimum image pixel count
MAX_PIXELS57600Maximum image pixel count

Model Settings

SettingValueDescription
Precision (CUDA/MPS)float16Half-precision to reduce VRAM usage
Precision (CPU)float32Full precision fallback
Distance metriccosineVector similarity metric in ChromaDB
Distance threshold0.7Maximum cosine distance to accept a result

Supported Media Formats

Images

.jpg, .jpeg, .png, .webp, .bmp, .heic, .heif, .tiff, .tif

Videos

.mp4, .mov, .avi, .webm, .mkv

Device Selection Logic

if torch.cuda.is_available():
    return "cuda"
elif hasattr(torch.backends, "mps") and torch.backends.mps.is_available():
    return "mps"
return "cpu"

Last Updated: 2026-06-17