APP_ENV=development LOG_LEVEL=INFO MODEL_VERSION=v3.0.0 REDIS_URL=redis://localhost:6379/0 HF_TOKEN= # ABMIL: either local path OR Hub (Hub wins when ABMIL_HF_REPO_ID is set) # NOTE: this code targets the scale-aware hybrid-LSE ABMIL. Point ABMIL_HF_FILENAME/REVISION # at the RETRAINED checkpoint (the old plain-attention _v2 file will NOT load under strict=True). MODEL_CHECKPOINT_PATH=/absolute/path/to/production_model.pt ABMIL_HF_REPO_ID= ABMIL_HF_FILENAME=production_model_s16plus_v3.pt ABMIL_HF_REVISION= ABMIL_HF_SUBFOLDER= ABMIL_HF_LOCAL_FILES_ONLY=false # Production backbone is ViT-S/16+ (384-dim) — must match the retrained checkpoint's input_dim. DINOV3_MODEL_ID=facebook/dinov3-vits16plus-pretrain-lvd1689m EMBEDDING_BATCH_SIZE=16 EMBEDDING_DEVICE= EMBEDDING_DTYPE= DINOV3_LOCAL_FILES_ONLY=false REPLAY_ATTACK_TTL_S=60 PREDICTION_CACHE_TTL_S=300 MAX_IMAGE_SIZE_MB=16 # Multi-scale tiling (must match the training extraction config used to build the checkpoint's bags). TILE_SIZES=128,64 TILE_OVERLAP_RATIO=0.25 TILE_SHRINK_FACTOR=0.92 TILE_MIN_MASK_COVERAGE=0.8 # Optional tile-quality gates — DISABLED by default to match current training extraction. TILE_VARIANCE_GATE_ENABLED=false TILE_MIN_VARIANCE=50.0 TILE_HIGHLIGHT_GATE_ENABLED=false TILE_HIGHLIGHT_THRESH=235 TILE_MAX_HIGHLIGHT_FRAC=0.40 # Scale-aware hybrid-LSE ABMIL params (scale_embed_dim / num_scales are inferred from the # checkpoint; ABMIL_LSE_R is NOT stored in the checkpoint and must match the training default). ABMIL_SCALE_EMBED_DIM=16 ABMIL_NUM_SCALES=3 ABMIL_LSE_R=5.0