Update Deploy - now use fetch weight
This commit is contained in:
@@ -77,7 +77,17 @@ Three models are used by default: `hustvl/vitmatte-base-composition-1k` (matting
|
||||
`ZhengPeng7/BiRefNet` (default segmenter), `skytnt/anime-seg` (optional segmenter).
|
||||
A fourth model, `ZhengPeng7/BiRefNet_HR-matting` (~425 MB), is only needed if you
|
||||
enable the **cross-check** veto — see the note at the end of this section.
|
||||
Pick **one** of the two layouts below.
|
||||
|
||||
**Quick path (recommended):** run the bundled script — no arguments — to download
|
||||
every model into `models/` via the hf-mirror (proxy bypassed, Xet disabled,
|
||||
already-present folders skipped). Afterwards the app has full functionality offline:
|
||||
|
||||
```bash
|
||||
python scripts/fetch_weights.py
|
||||
```
|
||||
|
||||
The two manual layouts below are for finer control (e.g. a shared HF cache, or
|
||||
picking specific models).
|
||||
|
||||
### Option A — HuggingFace cache + offline mode (recommended)
|
||||
|
||||
|
||||
+10
-1
@@ -71,7 +71,16 @@ print('torch', torch.__version__, 'cuda=', torch.version.cuda)"
|
||||
默认用到三个模型:`hustvl/vitmatte-base-composition-1k`(抠图)、
|
||||
`ZhengPeng7/BiRefNet`(默认分割)、`skytnt/anime-seg`(可选分割)。
|
||||
第四个模型 `ZhengPeng7/BiRefNet_HR-matting`(约 425 MB)只有在启用 **cross-check(交叉校验)
|
||||
否决**时才需要——见本节末尾说明。下面两种放法**二选一**。
|
||||
否决**时才需要——见本节末尾说明。
|
||||
|
||||
**一键方式(推荐)**:跑仓库自带脚本(无参数),经 hf-mirror 把所有模型下到 `models/`
|
||||
(绕过代理、禁用 Xet、已存在的文件夹自动跳过)。跑完主 app 即离线全功能可用:
|
||||
|
||||
```bash
|
||||
python scripts/fetch_weights.py
|
||||
```
|
||||
|
||||
下面两种手动放法用于更精细的控制(比如共享 HF 缓存、只下部分模型),**二选一**。
|
||||
|
||||
### 方案 A —— HuggingFace 缓存 + 离线模式(推荐)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user