Spaces:
Running on Zero
Running on Zero
Commit History
-
Fix ZeroGPU startup: disable Xet, run inference behind @spaces.GPUβ
The Space moved to ZeroGPU (zero-a10g), which broke startup in three ways: - The HF Xet downloader can't write its cache inside the ZeroGPU sandbox ("Permission denied (os error 13)"), crashing when open_clip pulled the CLIP classifier weights at runtime. Force the classic HTTP downloader (HF_HUB_DISABLE_XET=1, set before huggingface_hub is imported) and also preload the CLIP repo at build time. - GPU work must run inside a @spaces.GPU window. Wrap _run_inference in @spaces.GPU(duration=120), import the spaces scheduler (no-op fallback for local/non-ZeroGPU dev), and guard the CUDA cleanup for when no device is attached. - The CLIP classifier ran a text-encoder forward pass in its constructor; on ZeroGPU a forward at import time has no GPU. Defer the centroid computation to first use (inside the GPU window) and keep only the weight load eager. Also align suggested_hardware with the deployed zero-a10g.aeea5fe
-
Swap Places365 scene classifier for zero-shot CLIP ViT-B/32β
Replaces the perspective-view Places365-ResNet18 indoor/outdoor classifier with an OpenAI CLIP ViT-B/32 classifier (via open_clip) that scores the 4 equatorial cubemap faces against two text-prompt centroids. The cubemap is already built by the depth pipeline, so the router adds no extra projection cost. Also pulls in the latest SPDX headers from the upstream release.47efa14
-
rename io_classifier β scene_classifierβ
The "IO" name was a Places365 carry-over (their IO_places365.txt label file marks each category as Indoor/Outdoor). In Python "IO" reads as input/output by default and obscures what the module actually does. ``scene_classifier`` matches the existing ``--scene_mode`` flag and the ``_resolve_scene`` helper in app.py. The internal references to the upstream IO_places365.txt resource are kept intact.fad77c8