Pull requests / #480

#480 serve, web: a space-free vision temp dir, lazy vision, and a Chinese UI

closed · @ziphao2010 · 0 评论 · 在 GitHub 查看

Server & APIModels & quantsWindows

描述

Fixes vision on Windows machines where `%TEMP%` (or the user name) contains a space, makes `--lazy` work with vision enabled, and adds a Chinese UI.

- `serve/server.py`: `Vision.work_dir()` now picks a temporary directory whose path has no space. The encoder splits its `ENC <image> <out>` line at the last space (`tools/vision/strata_vision.cpp: parse_enc`), so a space in the temp path made every image fail with `Unable to open file`.
- `serve/server.py`: `--lazy` starts the encoder on the first request instead of refusing to start when vision is on; `Vision(start=False)` plus `alive()` / `restart()` / `close()` handle an encoder that has not started yet.
- `serve/test_server.py`: tests for both.
- `serve/web`: `i18n.js` (Chinese dictionary) loaded by `index.html` and `monitor.html`; both pages are `lang="zh-CN"` and carry a data-URI favicon.

站内延伸阅读

链到安装、模型与版本说明,便于 SEO/GEO,非官方 issue 正文。