Spaces:
Runtime error
Runtime error
| title: OneAlign Scorer (CPU fork) | |
| emoji: ⚖️ | |
| colorFrom: green | |
| colorTo: red | |
| sdk: gradio | |
| sdk_version: 4.44.1 | |
| python_version: "3.10" | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # OneAlign Scorer — CPU Fork (personal experiment) | |
| This is a fork of [teowu/OneScorer](https://huggingface.co/spaces/teowu/OneScorer) — the official Space for **Q-Align (ICML 2024)**. | |
| ## What this fork changes | |
| 1. **Remove broken `examples=...`** — the original Space's example assets are git-LFS pointers that fail to resolve on cold start, causing `gradio.Interface(... examples=[...])` to throw `PIL.UnidentifiedImageError` and the whole Space to crash. | |
| 2. **Auto-pick device** (CUDA → CPU) so it can attempt to boot on free CPU hardware. Original was hard-coded to `cuda:0`. | |
| 3. `cache_examples=False`, `show_api=False` for stability. | |
| ## ⚠️ Performance warning | |
| The underlying model is **q-future/one-align**, a ~8B mPLUG-Owl2 LMM. | |
| - On **GPU** (16~20GB VRAM): ~1~3 s per image. Works great. | |
| - On **free CPU Space** (this fork's hardware): the model **may load successfully but a single inference can take many minutes**, or hit RAM/timeout limits. This Space is uploaded **purely for boot-time troubleshooting** and as a stepping stone toward a paid GPU upgrade. | |
| If you need real usage, please either: | |
| - Run locally on a GPU machine, or | |
| - Duplicate this Space and upgrade to a **GPU runtime** (T4-small ≈ $0.40/hour) in Space settings. | |
| ## Credits | |
| Paper: Wu et al. *Q-Align: Teaching LMMs for Visual Scoring via Discrete Text-Defined Levels* (ICML 2024). arXiv:2312.17090 | |
| Original code: https://github.com/Q-Future/Q-Align | |
| Original Space: https://huggingface.co/spaces/teowu/OneScorer | |