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:
@@ -364,6 +364,14 @@ def import_media_file(self, task_id: int):
|
||||
if sidecar_path:
|
||||
apply_sidecar_metadata.delay(record.id, sidecar_path)
|
||||
|
||||
# Queue ML inference (WD14 tagging + SigLIP embedding)
|
||||
try:
|
||||
from app.tasks.ml import tag_and_embed
|
||||
tag_and_embed.apply_async(args=[record.id], queue='ml')
|
||||
except Exception as ml_err:
|
||||
# Never let an enqueue failure roll back an otherwise-successful import.
|
||||
log.warning(f"Could not enqueue tag_and_embed for image {record.id}: {ml_err}")
|
||||
|
||||
# Update batch stats
|
||||
if task.batch_id:
|
||||
from app.tasks.scan import update_batch_stats
|
||||
|
||||
Reference in New Issue
Block a user