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
| Constant | Value | Description |
|---|---|---|
DB_PATH | ./.db | Persistent ChromaDB storage directory |
THUMBNAIL_PATH | ./.cache/thumbnails | Pre-computed thumbnail storage |
MODEL_ID | ./Qwen/Qwen3-VL-Embedding-2B | Local model weights directory |
HF_MODEL_ID | Qwen/Qwen3-VL-Embedding-2B | HuggingFace Hub model identifier |
Embedding Settings
| Constant | Default | Description |
|---|---|---|
MAX_LENGTH | 8192 | Maximum token sequence length |
MIN_PIXELS | 4096 | Minimum image pixel count |
MAX_PIXELS | 57600 | Maximum image pixel count |
Model Settings
| Setting | Value | Description |
|---|---|---|
| Precision (CUDA/MPS) | float16 | Half-precision to reduce VRAM usage |
| Precision (CPU) | float32 | Full precision fallback |
| Distance metric | cosine | Vector similarity metric in ChromaDB |
| Distance threshold | 0.7 | Maximum 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"Related Components
- Image Indexing Pipeline – Uses these paths and constants during ingestion
- REST API Endpoints – Exposes many of these settings via endpoints
- Qwen3VL Embeddings – Model configuration and precision
Last Updated: 2026-06-17