ONNX export of patrickjohncyh/fashion-clip split into separate vision and text encoders. Hosted for use by @looped-app/garment-classifier as a third backbone option alongside the standard OpenAI CLIP variants from...
Source du modèle
Description de la source
ONNX export of patrickjohncyh/fashion-clip split into separate vision and text encoders. Hosted for use by @looped-app/garment-classifier as a third backbone option alongside the standard OpenAI CLIP variants from Xenova.
Sources
1 sourceVérifié 17 sept.
Artefacts du modèle
2 artefactsExtraits de sources
2 extraits| File | Size | Purpose |
|---|---|---|
vision_model.onnx | ~353 MB | Image encoder. Input pixel_values: float32 [B, 3, 224, 224] → output image_embeds: float32 [B, 512] (not L2-normalized). |
text_model.onnx | ~255 MB | Text encoder. Input input_ids: int64 [B, sequence_length] → output text_embeds: float32 [B, 512] (not L2-normalized). |
tokenizer.json | 3.6 MB | OpenAI CLIP BPE tokenizer (49408 vocab + SOT 49406 / EOT 49407). Compatible with @huggingface/tokenizers / @huggingface/transformers AutoTokenizer. |
config.json, vocab.json, merges.txt, special_tokens_map.json, tokenizer_config.json, preprocessor_config.json | misc | Standard transformers metadata. |
garment-classifier package does this naturally in its prompt-embedding precompute loop.patrickjohncyh/fashion-clip (282 likes, 3M downloads on HF as of 2026-05-24)torch.onnx.export on separate CLIPVisionModelWithProjection / CLIPTextModelWithProjection wrappers./tmp/fashionclip-split-export.py in the original session (orchestrator-direct).patrickjohncyh/fashion-clip).--- license: mit tags: - clip - onnx - fashion - zero-shot-image-classification language: - en pipeline_tag: zero-shot-image-classification base_model: patrickjohncyh/fashion-clip --- # FashionCLIP ONNX (split vision + text encoders) ONNX export of [`patrickjohncyh/fashion-clip`](https://huggingface.co/patrickjohncyh/fashion-clip) split into separate vision and text encoders. Hosted for use by [`@looped-app/garment-classifier`](https://github.com/looped-app/packages/tree/main/garment-classifier) as a third backbone option alongside the standard OpenAI CLIP variants from Xenova. ## Files | File | Size | Purpose | |---|---|---| | `vision_model.onnx` | ~353 MB | Image encoder. Input `pixel_values: float32 [B, 3, 224, 224]` → output `image_embeds: float32 [B, 512]` (not L2-normalized). | | `text_model.onnx` | ~255 MB | Text encoder. Input `input_ids: int64 [B, sequence_length]` → output `text_embeds: float32 [B, 512]` (not L2-normalized). | | `tokenizer.json` | 3.6 MB | OpenAI CLIP BPE tokenizer (49408 vocab + SOT 49406 / EOT 49407). Compatible with `@huggingface/tokenizers` / `@huggingface/transformers` `AutoTokenizer`. | | `config.json`, `vocab.json`, `merges.txt`, `special_tokens_map.json`, `tokenizer_config.json`, `preprocessor_config.json` | misc | Standard transformers metadata. | ## Caveats - **Text encoder batch size must be 1** at runtime due to a torch 2.12 export-time dynamic-axis baking quirk. Run prompts sequentially (one forward per prompt). Our `garment-classifier` package does this naturally in its prompt-embedding precompute loop. - **Outputs are NOT L2-normalized**. Normalize in the consumer code before cosine similarity (CLIP convention). - **Image preprocessing**: requires standard CLIP-style normalization: resize to 224×224 + mean=[0.48145466, 0.4578275, 0.40821073] / std=[0.26862954, 0.26130258, 0.27577711] applied per-channel. ## Provenance - Base model: `patrickjohncyh/fashion-clip` (282 likes, 3M downloads on HF as of 2026-05-24) - Export: torch 2.12.0 + onnx 1.21.0 via `torch.onnx.export` on separate `CLIPVisionModelWithProjection` / `CLIPTextModelWithProjection` wrappers. - Verification: real-image cosine vs PyTorch reference. Output is functional (no NaN, sensible top-1 predictions on apparel imagery). - Export script: `/tmp/fashionclip-split-export.py` in the original session (orchestrator-direct). - License: MIT (inh...
Source context: 14 downloads · 0 likes · Pipeline zero-shot-image-classification · Repo Frapic/fashion-clip-onnx