Skip to content

Commit 30f2457

Browse files
authored
补充和 载入模型有关常见问题 的readme (#213)
* 对README_zh.md做出补充 * 将补充的README-zh.md翻译为英文
1 parent b5f8732 commit 30f2457

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ python app.py
120120

121121
Go to the [releases page](https://github.com/Artrajz/vits-simple-api/releases) and download the latest deployment package. Extract the downloaded files.
122122

123+
For compression reasons (and the Github release limiting the size of a single file to 2GB), there are some optional dependency models that are not included in the deployment package, and these are usually downloaded **automatically** by the program when loading the corresponding sound model (if the loaded model requires it).
124+
125+
In case the program doesn't download the dependency model manually, or if you find that If the program does not download the sound model automatically and you need to download the dependency model manually, or if you find that the successfully loaded sound model is empty, please read the **Troubleshooting - Successfully loaded model is empty** section below.
126+
123127
### Step 2: Start
124128

125129
Run `start.bat` to launch the program.
@@ -135,6 +139,8 @@ Download the VITS model files and place them in the `data/models` folder.
135139

136140
Starting from version 0.6.6, it is default behavior to automatically load all models in the `data/models` folder, making it easier for beginners to use.
137141

142+
(If this is your first time and you don't have any additional special needs, you don't need to know how to load the model manually)
143+
138144
#### Manual Model Loading
139145

140146
After the initial startup, a config.yaml configuration file will be generated. You need to change `tts_config.auto_load` to `false` in order to enable manual loading mode.
@@ -333,6 +339,25 @@ To ensure compatibility with the Bert-VITS2 model, modify the config.json file b
333339

334340
Please note that for the Chinese extra version, the version should be changed to `extra` or `zh-clap`, and for the extra fix version, the version should be `2.4` or `extra-fix`.
335341

342+
## Troubleshooting - Successfully loaded models are empty
343+
First of all, please check if your program directory is a **plain English path** (can't contain any Chinese or special characters), or else you will encounter the situation that the program can't load models even if it doesn't report an error.
344+
345+
Secondly, please check if your models are correctly placed (refer to the section of **Manual Model Loading**).
346+
347+
Your models should not be placed directly in `data/models`, but in a folder under the models directory (this folder can be any name without special characters), one directory for each sound model.
348+
349+
Lastly, check the log for any messages like download failure, you can refer to the following section on **manually placing dependent models**
350+
351+
### Manually placing dependency models
352+
353+
download https://hf-mirror.com/TencentGameMate/chinese-hubert-base/resolve/main/pytorch_model.bin place in 'data\hubert\chinese_hubert_base'
354+
355+
download https://hf-mirror.com/hfl/chinese-roberta-wwm-ext-large/resolve/main/pytorch_model.bin place 'data\bert\chinese-roberta-wwm-ext-large'
356+
357+
download https://openi.pcl.ac.cn/Stardust_minus/Bert-VITS2/modelmanage/model_filelist_tmpl?name=G2PWModel-v2-onnx place 'data\G2PWModel'
358+
359+
If you don't want to download it from the openi.pcl.ac.cn platform (large files are not available directly from your browser), you can download it here https://huggingface.co/restsun2028/B2ZHTH/blob/b0a8cc2c69c6d1962c679ea2887080a0a86e6bbf/g2pW/g2pW.onnx Get to 'g2pW.onnx'
360+
336361
# API
337362

338363
## GET

README_zh.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ python app.py
122122

123123
进入[releases页面](https://github.com/Artrajz/vits-simple-api/releases)下载并解压最新的部署包
124124

125+
出于压缩体积考虑(以及Github release限制单个文件2GB大小),有部分可选的依赖模型没有被内置于部署包中,这些模型通常会在加载对应声音模型时被程序**自动下载**(如果载入的模型需要的话)
126+
127+
假如程序没有自动下载成功需要手动下载对应依赖模型,或者您发现成功载入的声音模型为空,请阅读下面的**故障排除——成功载入的模型为空**部分
128+
125129
### 步骤2:启动
126130

127131
运行start.bat启动程序
@@ -136,7 +140,7 @@ python app.py
136140

137141
#### 自动加载模型
138142

139-
v0.6.6版本之后默认会**自动加载**`data/models`文件夹下的所有模型,方便新手使用。
143+
v0.6.6版本之后默认会**自动加载**`data/models`文件夹下的所有模型,方便新手使用(如果您是第一次使用并且没有任何额外的特殊需要,您可以不用了解如何手动加载模型)
140144

141145
#### 手动加载模型
142146

@@ -343,6 +347,25 @@ url中的IP可在API启动后找到,一般使用192.168开头的局域网IP。
343347

344348
需要注意的是,中文特化版的版本号应改为`extra`或`zh-clap`,特化修复版的版本号为`2.4`或`extra-fix`。
345349

350+
## 故障排除——成功载入的模型为空
351+
首先,请检查您的程序目录是否为**纯英文路径**(不能含有任何的中文或者特殊字符),否则将会碰到程序不报错也无法载入模型的情况
352+
353+
其次,请核对您的模型位置是否放置正确(可参考**手动加载模型**部分)
354+
355+
您的模型不应该直接放置在`data/models`,而是应该放置在models目录下面的文件夹中(这个文件夹可以是没有特殊字符的任意名称),每个声音模型对应一个目录
356+
357+
最后,请检查log中是否有类似下载失败的信息,您可以参考下文手动放置依赖模型
358+
359+
### 手动放置依赖模型
360+
361+
下载 https://hf-mirror.com/TencentGameMate/chinese-hubert-base/resolve/main/pytorch_model.bin 放置于 'data\hubert\chinese_hubert_base'
362+
363+
下载 https://hf-mirror.com/hfl/chinese-roberta-wwm-ext-large/resolve/main/pytorch_model.bin 放置于 'data\bert\chinese-roberta-wwm-ext-large'
364+
365+
下载 https://openi.pcl.ac.cn/Stardust_minus/Bert-VITS2/modelmanage/model_filelist_tmpl?name=G2PWModel-v2-onnx 放置于 'data\G2PWModel'
366+
367+
若您不想从启智平台下载(大文件无法直接浏览器上获取),则可以从这里 https://huggingface.co/restsun2028/B2ZHTH/blob/b0a8cc2c69c6d1962c679ea2887080a0a86e6bbf/g2pW/g2pW.onnx 获取到 'g2pW.onnx'
368+
346369
# API
347370

348371
## GET

0 commit comments

Comments
 (0)