Spaces:
Paused
Paused
Commit History
26 days ago
-
Fix 16GB OOM: never build the SigLIP2 text tower on the Space
RADIO's SigLIP2Adaptor.__init__ calls AutoModel.from_pretrained on google/siglip2-giant-opt-patch16-384 — downloading 7.49 GB and materializing the entire giant model — purely to keep model.text_model, then del's the rest. On a 16 GB Space that download's page-cache and mmap footprint, stacked on the ~5.5 GB of real allocations, exceeds the container limit before anything can be freed. The Space was crash-looping: OOM, restart, re-download, OOM. The previous mitigation (0462568, 8266ce5) could not work. It freed the tower *after* the peak, and freed 2.8 GB rather than the 7.5 GB the comments claimed — 7.49 GB is the download size, not the resident text_model. Our prompt set is 11 hardcoded strings, so the tower is not needed at all: - export_text_embeddings.py runs once offline and writes text_embeddings.pt (11 x 1536 fp32, 67 KB), committed via LFS. - At startup, pop the `siglip2` factory from RADIO's adaptor_registry. create_adaptor falls back to GenericAdaptor for unregistere…e510bac