Garment photo
Loading starter apparel scene…
Starter apparel scenes & local upload
Zero-shot ranking (temperature softmax)
See inside Marqo-FashionSigLIP
SigLIP scores every (image, text) pair independently: logit = exp(logit_scale)·cos + logit_bias.
This checkpoint's model.safetensors stores logit_scale = 4.5203 (×91.86) and
logit_bias = 0.0, so the raw sigmoid saturates near 1 for any positive cosine — the table makes
that visible. Marqo's card ranks with (100 · cos).softmax(), which is what the bars show.
Run the model to populate the per-tag calibration table.
Verified ONNX contract
- HF repo
- Marqo/marqo-fashionSigLIP @ c56244cc
- Classes
- SiglipTextModel + SiglipVisionModel + AutoTokenizer + AutoProcessor
- WebGPU
- q4f16 · text 108,904,023 B + vision 53,686,874 B (165.0 MB total)
- CPU WASM
- int8 · text 111,125,229 B + vision 93,973,410 B (207.5 MB total)
- Tokenizer
- tokenizer.json 2,421,300 B · SentencePiece 32k · context 64
- Preprocess
- 224×224 bicubic squash · mean/std 0.5
- Runtime
- Transformers.js 4.3.2 local pin in worker.js (shared lib stays 3.7.5)
- License
- Apache-2.0
Why 4.3.2 and not the shared 3.7.5
Stage 0 Chrome probing showed 3.7.5's ORT-Web cannot create the int8 vision session
(ConvInteger(10) on /trunk/patch_embed/proj/Conv_quant) and its WebGPU q4f16 path
collapses different garments onto the same tag. The local 4.3.2 pin runs both paths with distinct,
finite scores; it is scoped to this route's worker.js only.
Show the code — SigLIP calibration: learned-logit sigmoid vs temperature softmax (calibrateScores)
Show the code — Off-main-thread cached text embeddings + vision scoring on Transformers.js 4.3.2 (runScore)
Why it matters
- Catalogue enrichment without uploads — tag category, colour, material and occasion for every SKU photo locally, then export structured facets.
- Open vocabulary merchandising — a buyer can type “quiet-luxury cashmere crewneck” and rank the shelf instantly, no retraining.
- Private visual search — the same 768-d embeddings power similarity search over a personal wardrobe that never leaves the device.
- Measurable trust — calibration, margin and stress telemetry show when a tag is solid and when a human should review it.
Explore the Marqo-FashionSigLIP use-case ladder
Basics · Calibration & attribute probes
Sweep softmax temperature and sigmoid bias on the same cosines, then pull material, colour and silhouette apart with independent attribute softmaxes.
Practical · Multi-SKU facet auto-tagger
Pause, resume or cancel a catalogue queue that emits category / colour / material / occasion facets and formula-safe CSV + JSON manifests.
Wild · 5-regime fashion stress suite
Macro fabric crop, desaturation, busy street plate, 15° rotation and 96 px low-res — rank-1 retention plus embedding cosine drift.
Multi-model · SegFormer-B0 → FashionSigLIP
Strip the background with a 4.4 MB clothes segmenter, then compare whole-image vs garment-isolated tag margins.
How the API works
Load the tokenizer, processor and both SigLIP towers once (in a worker), embed the prompts, embed the image, and compare L2-normalised vectors:
import { AutoTokenizer, AutoProcessor, SiglipTextModel, SiglipVisionModel, RawImage }
from "https://cdn.jsdelivr.net/npm/@huggingface/transformers@4.3.2";
const id = "Marqo/marqo-fashionSigLIP";
const opts = { device: "webgpu", dtype: "q4f16" }; // or { device: "wasm", dtype: "int8" }
const tokenizer = await AutoTokenizer.from_pretrained(id);
const processor = await AutoProcessor.from_pretrained(id);
const textModel = await SiglipTextModel.from_pretrained(id, opts);
const visionModel = await SiglipVisionModel.from_pretrained(id, opts);
const text = tokenizer(["a tailored blazer", "a graphic t-shirt"], { padding: "max_length", max_length: 64, truncation: true });
const { text_embeds } = await textModel(text);
const { image_embeds } = await visionModel(await processor(await RawImage.read(url)));
const cos = image_embeds.normalize().matmul(text_embeds.normalize().transpose(1, 0));
// Marqo card: probs = softmax(100 · cos)