|
58 | 58 | "source": [ |
59 | 59 | "#@title 克隆仓库\n", |
60 | 60 | "\n", |
61 | | - "!git clone --depth=1 https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI\n", |
| 61 | + "!git clone --depth=1 -b stable https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI\n", |
62 | 62 | "%cd /content/Retrieval-based-Voice-Conversion-WebUI\n", |
63 | 63 | "!mkdir -p pretrained uvr5_weights" |
64 | 64 | ], |
|
80 | 80 | "execution_count": null, |
81 | 81 | "outputs": [] |
82 | 82 | }, |
| 83 | + { |
| 84 | + "cell_type": "code", |
| 85 | + "source": [ |
| 86 | + "#@title 安装aria2\n", |
| 87 | + "!apt -y install -qq aria2" |
| 88 | + ], |
| 89 | + "metadata": { |
| 90 | + "id": "pqE0PrnuRqI2" |
| 91 | + }, |
| 92 | + "execution_count": null, |
| 93 | + "outputs": [] |
| 94 | + }, |
83 | 95 | { |
84 | 96 | "cell_type": "code", |
85 | 97 | "source": [ |
86 | 98 | "#@title 下载底模\n", |
87 | | - "!apt -y install -qq aria2\n", |
88 | 99 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D32k.pth\n", |
89 | 100 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D40k.pth\n", |
90 | 101 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o D48k.pth\n", |
|
96 | 107 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0D48k.pth\n", |
97 | 108 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G32k.pth\n", |
98 | 109 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G40k.pth\n", |
99 | | - "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G48k.pth\n", |
100 | | - "\n", |
| 110 | + "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained/f0G48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained -o f0G48k.pth" |
| 111 | + ], |
| 112 | + "metadata": { |
| 113 | + "id": "UG3XpUwEomUz" |
| 114 | + }, |
| 115 | + "execution_count": null, |
| 116 | + "outputs": [] |
| 117 | + }, |
| 118 | + { |
| 119 | + "cell_type": "code", |
| 120 | + "source": [ |
| 121 | + "#@title 下载人声分离模型\n", |
101 | 122 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP2-人声vocals+非人声instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP2-人声vocals+非人声instrumentals.pth\n", |
102 | | - "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP5-主旋律人声vocals+其他instrumentals.pth\n", |
103 | | - "\n", |
| 123 | + "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/uvr5_weights/HP5-主旋律人声vocals+其他instrumentals.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/uvr5_weights -o HP5-主旋律人声vocals+其他instrumentals.pth" |
| 124 | + ], |
| 125 | + "metadata": { |
| 126 | + "id": "HugjmZqZRuiF" |
| 127 | + }, |
| 128 | + "execution_count": null, |
| 129 | + "outputs": [] |
| 130 | + }, |
| 131 | + { |
| 132 | + "cell_type": "code", |
| 133 | + "source": [ |
| 134 | + "#@title 下载hubert_base\n", |
104 | 135 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt -d /content/Retrieval-based-Voice-Conversion-WebUI -o hubert_base.pt" |
105 | 136 | ], |
106 | 137 | "metadata": { |
107 | | - "id": "UG3XpUwEomUz" |
| 138 | + "id": "2RCaT9FTR0ej" |
108 | 139 | }, |
109 | 140 | "execution_count": null, |
110 | 141 | "outputs": [] |
|
223 | 254 | "#@title 手动预处理(不推荐)\n", |
224 | 255 | "#@markdown 模型名\n", |
225 | 256 | "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 257 | + "#@markdown 采样率\n", |
| 258 | + "BITRATE = 48000 #@param {type:\"integer\"}\n", |
| 259 | + "#@markdown 使用的进程数\n", |
| 260 | + "THREADCOUNT = 8 #@param {type:\"integer\"}\n", |
226 | 261 | "\n", |
227 | | - "!python3 trainset_preprocess_pipeline_print.py /content/dataset 48000 8 logs/{MODELNAME} True\n" |
| 262 | + "!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True\n" |
228 | 263 | ], |
229 | 264 | "metadata": { |
230 | 265 | "id": "ZKAyuKb9J6dz" |
|
238 | 273 | "#@title 手动提取特征(不推荐)\n", |
239 | 274 | "#@markdown 模型名\n", |
240 | 275 | "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 276 | + "#@markdown 使用的进程数\n", |
| 277 | + "THREADCOUNT = 8 #@param {type:\"integer\"}\n", |
| 278 | + "#@markdown 音高提取算法\n", |
| 279 | + "ALGO = \"harvest\" #@param {type:\"string\"}\n", |
| 280 | + "\n", |
| 281 | + "!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n", |
241 | 282 | "\n", |
242 | | - "!python3 extract_feature_print.py 1 0 0 logs/{MODELNAME}\n" |
| 283 | + "!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}\n" |
243 | 284 | ], |
244 | 285 | "metadata": { |
245 | 286 | "id": "CrxJqzAUKmPJ" |
|
253 | 294 | "#@title 手动训练(不推荐)\n", |
254 | 295 | "#@markdown 模型名\n", |
255 | 296 | "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 297 | + "#@markdown 使用的GPU\n", |
| 298 | + "USEGPU = \"0\" #@param {type:\"string\"}\n", |
| 299 | + "#@markdown 批大小\n", |
| 300 | + "BATCHSIZE = 32 #@param {type:\"integer\"}\n", |
256 | 301 | "#@markdown 停止的epoch\n", |
257 | 302 | "MODELEPOCH = 3200 #@param {type:\"integer\"}\n", |
258 | 303 | "#@markdown 保存epoch间隔\n", |
259 | 304 | "EPOCHSAVE = 100 #@param {type:\"integer\"}\n", |
260 | 305 | "#@markdown 采样率\n", |
261 | 306 | "MODELSAMPLE = \"48k\" #@param {type:\"string\"}\n", |
| 307 | + "#@markdown 是否缓存训练集\n", |
| 308 | + "CACHEDATA = 1 #@param {type:\"integer\"}\n", |
| 309 | + "#@markdown 是否仅保存最新的ckpt文件\n", |
| 310 | + "ONLYLATEST = 0 #@param {type:\"integer\"}\n", |
262 | 311 | "\n", |
263 | | - "!python3 train_nsf_sim_cache_sid_load_pretrain.py -e lulu -sr {MODELSAMPLE} -f0 1 -bs 32 -g 0 -te {MODELEPOCH} -se {EPOCHSAVE} -pg pretrained/f0G{MODELSAMPLE}.pth -pd pretrained/f0D{MODELSAMPLE}.pth -l 0 -c 1\n" |
| 312 | + "!python3 train_nsf_sim_cache_sid_load_pretrain.py -e lulu -sr {MODELSAMPLE} -f0 1 -bs {BATCHSIZE} -g {USEGPU} -te {MODELEPOCH} -se {EPOCHSAVE} -pg pretrained/f0G{MODELSAMPLE}.pth -pd pretrained/f0D{MODELSAMPLE}.pth -l {ONLYLATEST} -c {CACHEDATA}\n" |
264 | 313 | ], |
265 | 314 | "metadata": { |
266 | 315 | "id": "IMLPLKOaKj58" |
|
0 commit comments