Add files via upload

This commit is contained in:
RVC-Boss 2023-05-13 03:49:38 +08:00 committed by GitHub
parent 0d2212c8ea
commit 3909ce4a7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 184 additions and 0 deletions

89
docs/faq.md Normal file
View File

@ -0,0 +1,89 @@
## Q1:ffmpeg error/utf8 error.
大概率不是ffmpeg问题而是音频路径问题<br>
ffmpeg读取路径带空格、()等特殊符号可能出现ffmpeg error训练集音频带中文路径在写入filelist.txt的时候可能出现utf8 error<br>
## Q2:一键训练结束没有索引
显示"Training is done. The program is closed."则模型训练成功,后续紧邻的报错是假的;<br>
一键训练结束完成没有added开头的索引文件可能是因为训练集太大卡住了添加索引的步骤已通过批处理add索引解决内存add索引对内存需求过大的问题。临时可尝试再次点击"训练索引"按钮。<br>
## Q3:训练结束推理没看到训练集的音色
点刷新音色再看看如果还没有看看训练有没有报错控制台和webui的截图logs/实验名下的log都可以发给开发者看看。<br>
## Q4:如何分享模型
rvc_root/logs/实验名 下面存储的pth不是用来分享模型用来推理的而是为了存储实验状态供复现以及继续训练用的。用来分享的模型应该是weights文件夹下大小为60+MB的pth文件<br>
后续将把weights/exp_name.pth和logs/exp_name/added_xxx.index合并打包成weights/exp_name.zip省去填写index的步骤那么zip文件用来分享不要分享pth文件除非是想换机器继续训练<br>
如果你把logs文件夹下的几百MB的pth文件复制/分享到weights文件夹下强行用于推理可能会出现f0tgt_sr等各种key不存在的报错。你需要用ckpt选项卡最下面手工或自动本地logs下如果能找到相关信息则会自动选择是否携带音高、目标音频采样率的选项后进行ckpt小模型提取输入路径填G开头的那个提取完在weights文件夹下会出现60+MB的pth文件刷新音色后可以选择使用。<br>
## Q5:Connection Error.
也许你关闭了控制台(黑色窗口)。<br>
## Q6:WebUI弹出Expecting value: line 1 column 1 (char 0).
请关闭系统局域网代理/全局代理。<br>
这个不仅是客户端的代理也包括服务端的代理例如你使用autodl设置了http_proxy和https_proxy学术加速使用时也需要unset关掉<br>
## Q7:不用WebUI如何通过命令训练推理
训练脚本:<br>
可先跑通WebUI消息窗内会显示数据集处理和训练用命令行<br>
推理脚本:<br>
https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/myinfer.py<br>
例子:<br>
runtime\python.exe myinfer.py 0 "E:\codes\py39\RVC-beta\todo-songs\1111.wav" "E:\codes\py39\logs\mi-test\added_IVF677_Flat_nprobe_7.index" harvest "test.wav" "weights/mi-test.pth" 0.6 cuda:0 True<br>
f0up_key=sys.argv[1]<br>
input_path=sys.argv[2]<br>
index_path=sys.argv[3]<br>
f0method=sys.argv[4]#harvest or pm<br>
opt_path=sys.argv[5]<br>
model_path=sys.argv[6]<br>
index_rate=float(sys.argv[7])<br>
device=sys.argv[8]<br>
is_half=bool(sys.argv[9])<br>
## Q8:Cuda error/Cuda out of memory.
小概率是cuda配置问题、设备不支持大概率是显存不够out of memory<br>
训练的话缩小batch size如果缩小到1还不够只能更换显卡训练推理的话酌情缩小config.py结尾的x_padx_queryx_centerx_max。4G以下显存例如10603G和各种2G显卡可以直接放弃4G显存显卡还有救。<br>
## Q9:total_epoch调多少比较好
如果训练集音质差底噪大20~30足够了调太高底模音质无法带高你的低音质训练集<br>
如果训练集音质高底噪低时长多可以调高200是ok的训练速度很快既然你有条件准备高音质训练集显卡想必条件也不错肯定不在乎多一些训练时间<br>
## Q10:需要多少训练集时长
推荐10min至50min<br>
  保证音质高底噪低的情况下,如果有个人特色的音色统一,则多多益善<br>
  高水平的训练集(精简+音色有特色5min至10min也是ok的仓库作者本人就经常这么玩<br>
也有人拿1min至2min的数据来训练并且训练成功的但是成功经验是其他人不可复现的不太具备参考价值。这要求训练集音色特色非常明显比如说高频气声较明显的萝莉少女音且音质高<br>
1min以下时长数据目前没见有人尝试成功过。不建议进行这种鬼畜行为。<br>
## Q11:index rate干嘛用的怎么调科普
  如果底模和推理源的音质高于训练集的音质,他们可以带高推理结果的音质,但代价可能是音色往底模/推理源的音色靠,这种现象叫做"音色泄露"<br>
index rate用来削减/解决音色泄露问题。调到1则理论上不存在推理源的音色泄露问题但音质更倾向于训练集。如果训练集音质比推理源低则index rate调高可能降低音质。调到0则不具备利用检索混合来保护训练集音色的效果<br>
如果训练集优质时长多可调高total_epoch此时模型本身不太会引用推理源和底模的音色很少存在"音色泄露"问题此时index_rate不重要你甚至可以不建立/分享index索引文件。<br>
## Q11:推理怎么选gpu
config.py文件里device cuda:后面选择卡号;<br>
卡号和显卡的映射关系,在训练选项卡的显卡信息栏里能看到。<br>
## Q12:如何推理训练中间保存的pth
通过ckpt选项卡最下面提取小模型。<br>
## Q13:如何中断和继续训练
现阶段只能关闭WebUI控制台双击go-web.bat重启程序。网页参数也要刷新重新填写<br>
继续训练相同网页参数点训练模型就会接着上次的checkpoint继续训练。<br>
## Q14:训练时出现文件页面/内存error
进程开太多了,内存炸了。你可能可以通过如下方式解决<br>
1、"提取音高和处理数据使用的CPU进程数" 酌情拉低;<br>
2、训练集音频手工切一下不要太长。<br>

95
docs/faq_en.md Normal file
View File

@ -0,0 +1,95 @@
## Q1:ffmpeg error/utf8 error.
It is most likely not a FFmpeg issue, but rather an audio path issue;
FFmpeg may encounter an error when reading paths containing special characters like spaces and (), which may cause an FFmpeg error; and when the training set's audio contains Chinese paths, writing it into filelist.txt may cause a utf8 error.<br>
## Q2:Cannot find index file after "One-click Training".
If it displays "Training is done. The program is closed," then the model has been trained successfully, and the subsequent errors are fake;
The lack of an 'added' index file after One-click training may be due to the training set being too large, causing the addition of the index to get stuck; this has been resolved by using batch processing to add the index, which solves the problem of memory overload when adding the index. As a temporary solution, try clicking the "Train Index" button again.<br>
## Q3:Cannot find the model in “Inferencing timbre” after training
Click “Refresh timbre list” and check again; if still not visible, check if there are any errors during training and send screenshots of the console, web UI, and logs/experiment_name/*.log to the developers for further analysis.<br>
## Q4:How to share a model/How to use others' models?
The pth files stored in rvc_root/logs/experiment_name are not meant for sharing or inference, but for storing the experiment checkpoits for reproducibility and further training. The model to be shared should be the 60+MB pth file in the weights folder;
In the future, weights/exp_name.pth and logs/exp_name/added_xxx.index will be merged into a single weights/exp_name.zip file to eliminate the need for manual index input; so share the zip file, not the pth file, unless you want to continue training on a different machine;
Copying/sharing the several hundred MB pth files from the logs folder to the weights folder for forced inference may result in errors such as missing f0, tgt_sr, or other keys. You need to use the ckpt tab at the bottom to manually or automatically (if the information is found in the logs/exp_name), select whether to include pitch infomation and target audio sampling rate options and then extract the smaller model. After extraction, there will be a 60+ MB pth file in the weights folder, and you can refresh the voices to use it.<br>
## Q5:Connection Error.
You may have closed the console (black command line window).<br>
## Q6:WebUI popup 'Expecting value: line 1 column 1 (char 0)'.
Please disable system LAN proxy/global proxy and then refresh.<br>
## Q7:How to train and infer without the WebUI?
Training script:<br>
You can run training in WebUI first, and the command-line versions of dataset preprocessing and training will be displayed in the message window.<br>
Inference script:<br>
https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/myinfer.py<br>
e.g.<br>
runtime\python.exe myinfer.py 0 "E:\codes\py39\RVC-beta\todo-songs\1111.wav" "E:\codes\py39\logs\mi-test\added_IVF677_Flat_nprobe_7.index" harvest "test.wav" "weights/mi-test.pth" 0.6 cuda:0 True<br>
f0up_key=sys.argv[1]<br>
input_path=sys.argv[2]<br>
index_path=sys.argv[3]<br>
f0method=sys.argv[4]#harvest or pm<br>
opt_path=sys.argv[5]<br>
model_path=sys.argv[6]<br>
index_rate=float(sys.argv[7])<br>
device=sys.argv[8]<br>
is_half=bool(sys.argv[9])<br>
## Q8:Cuda error/Cuda out of memory.
There is a small chance that there is a problem with the CUDA configuration or the device is not supported; more likely, there is not enough memory (out of memory).<br>
For training, reduce the batch size (if reducing to 1 is still not enough, you may need to change the graphics card); for inference, adjust the x_pad, x_query, x_center, and x_max settings in the config.py file as needed. 4G or lower memory cards (e.g. 1060(3G) and various 2G cards) can be abandoned, while 4G memory cards still have a chance.<br>
## Q9:How many total_epoch are optimal?
If the training dataset's audio quality is poor and the noise floor is high, 20-30 epochs are sufficient. Setting it too high won't improve the audio quality of your low-quality training set.<br>
If the training set audio quality is high, the noise floor is low, and there is sufficient duration, you can increase it. 200 is acceptable (since training is fast, and if you're able to prepare a high-quality training set, your GPU likely can handle a longer training duration without issue).<br>
## Q10:How much training set duration is needed?
A dataset of around 10min to 50min is recommended.<br>
With guaranteed high sound quality and low bottom noise, more can be added if the dataset's timbre is uniform.<br>
For a high-level training set (lean + distinctive tone), 5min to 10min is fine.<br>
There are some people who have trained successfully with 1min to 2min data, but the success is not reproducible by others and is not very informative. <br>This requires that the training set has a very distinctive timbre (e.g. a high-frequency airy anime girl sound) and the quality of the audio is high;
Data of less than 1min duration has not been successfully attempted so far. This is not recommended.<br>
## Q11:What is the index rate for and how to adjust it?
If the tone quality of the pre-trained model and inference source is higher than that of the training set, they can bring up the tone quality of the inference result, but at the cost of a possible tone bias towards the tone of the underlying model/inference source rather than the tone of the training set, which is generally referred to as "tone leakage".<br>
The index rate is used to reduce/resolve the timbre leakage problem. If the index rate is set to 1, theoretically there is no timbre leakage from the inference source and the timbre quality is more biased towards the training set. If the training set has a lower sound quality than the inference source, then a higher index rate may reduce the sound quality. Turning it down to 0 does not have the effect of using retrieval blending to protect the training set tones.<br>
If the training set has good audio quality and long duration, turn up the total_epoch, when the model itself is less likely to refer to the inferred source and the pretrained underlying model, and there is little "tone leakage", the index_rate is not important and you can even not create/share the index file.<br>
## Q12:How to choose the gpu when inferring?
In the config.py file, select the card number after "device cuda:".<br>
The mapping between card number and graphics card can be seen in the graphics card information section of the training tab.<br>
## Q13:How to use the model saved in the middle of training?
Save via model extraction at the bottom of the ckpt processing tab.
## Q14:File/memory error(when training)?
Too many processes and your memory is not enough. You may fix it by:
1、decrease "Number of CPU threads".
2、pre-cut trainset to shorter audio files.