feat: ML tag suggestions, character/fandom integrity, underscores, modal polish

Consolidated merge of feat/tag-suggestions branch. Original 64-commit history
was lost to git-object corruption in a Nextcloud-synced checkout; this single
commit captures the equivalent diff.

Includes:
- pgvector-backed tag suggestion infra (WD14 + SigLIP centroids, ml-worker
  container, Celery tasks, suggestion service, accept/reject endpoints + modal
  UI with green/red chip buttons)
- Character/fandom integrity: title-case normalization on every write path,
  fandom-id backfill, maintenance task + settings button, migrations g26041901
  + h26041901 to canonicalize legacy rows with case-only duplicate merging
- Tag-underscores + modal polish: WD14 name canonicalization at emit + accept
  + add/bulk-add paths, migration i26041901 for legacy-row rename-or-merge
  across character/fandom/NULL kinds, suggestion-accept refresh parity via
  awaited loadTags, persistent chip tint
This commit is contained in:
2026-04-19 19:50:58 -04:00
parent 69b3ddcbd0
commit 0f35a0c484
37 changed files with 8642 additions and 30 deletions
+32 -1
View File
@@ -15,7 +15,7 @@ services:
# PostgreSQL database
postgres:
image: postgres:16-alpine
image: pgvector/pgvector:pg16
environment:
POSTGRES_USER: ${DB_USER:-imagerepo}
POSTGRES_PASSWORD: ${DB_PASS:-postgres}
@@ -105,6 +105,37 @@ services:
condition: service_healthy
restart: unless-stopped
# ML inference worker (CPU-only): WD14 tagging + SigLIP embeddings
# Handles: ml queue
ml-worker:
build:
context: .
dockerfile: Dockerfile.ml
command: celery -A app.celery_app:celery worker --loglevel=info -Q ml --concurrency=1
environment:
- TZ=${TZ:-America/New_York}
- DB_USER=${DB_USER:-imagerepo}
- DB_PASS=${DB_PASS:-postgres}
- DB_HOST=postgres
- DB_PORT=5432
- DB_NAME=${DB_NAME:-imagerepo}
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
- ML_MODEL_DIR=/models
volumes:
- ./imagerepo/images:/images:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
deploy:
resources:
limits:
cpus: '4.0'
memory: 8G
restart: unless-stopped
volumes:
redis_data:
postgres_data: