invensync-v3-embed / README.md
invensync's picture
Initial commit — SigLIP-2 embed API
2c45e8a verified
metadata
title: InvenSync V3 SigLIP-2 Embed API
emoji: 🔍
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
license: apache-2.0
short_description: SigLIP-2 fine-tuned embedding API for InvenSync V3

InvenSync V3 — SigLIP-2 Embed API

Self-hosted Hugging Face Space servant le modèle fine-tuné invensync/siglip2-base-invensync-v1 via une API HTTP minimale.

Contourne la limitation HF Inference Providers qui ne sert pas les SigLIP-2 custom en free tier. Latence sur Space CPU : ~1-2 s / image (acceptable pour démo + warming Cloudflare Worker).

Endpoints

Verbe + path Description
GET / health check (modèle chargé, device, version)
POST /embed input {image_base64}{vector[768], dim, model}

Format de l'image

image_base64 : chaîne base64 d'une image PNG/JPEG/WebP, avec ou sans préfixe data:image/...;base64,. Resize automatique en 384×384 BILINEAR avant inference.

Test local (optionnel)

docker build -t invensync-embed .
docker run -p 7860:7860 invensync-embed
# Puis :
curl -X POST http://localhost:7860/embed \
  -H 'Content-Type: application/json' \
  -d "{\"image_base64\":\"$(base64 -w0 test.jpg)\"}"

Déploiement

Push automatique sur HF Spaces — le commit déclenche un rebuild Docker (~10-15 min la première fois, ~2 min pour les rebuilds suivants).

Sécurité

  • Pas d'auth — le Space est public, appelé uniquement par le Worker invensync-v3-edge.
  • Pas de logs de payload (images des utilisateurs) — uniquement count + latence.

Hardware

CPU basic (free tier). 16 GB RAM. SigLIP-2 base prend ~800 Mo, plenty. Cold start ~30-60 s — warmable via cron Cloudflare toutes les 10 min.