|
20 | 20 | "!nvidia-smi"
|
21 | 21 | ]
|
22 | 22 | },
|
23 |
| - { |
24 |
| - "cell_type": "markdown", |
25 |
| - "metadata": {}, |
26 |
| - "source": [] |
27 |
| - }, |
28 | 23 | {
|
29 | 24 | "cell_type": "code",
|
30 | 25 | "execution_count": null,
|
|
75 | 70 | },
|
76 | 71 | "outputs": [],
|
77 | 72 | "source": [
|
| 73 | + "#@title 下载底模\n", |
78 | 74 | "!apt -y install -qq aria2\n",
|
79 | 75 | "!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",
|
80 | 76 | "!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",
|
|
106 | 102 | "#@title 从谷歌云盘加载打包好的数据集到/content/dataset\n",
|
107 | 103 | "\n",
|
108 | 104 | "#@markdown 数据集位置\n",
|
109 |
| - "DATASET = \"/content/drive/MyDrive/dataset/lulu20230327.zip\" #@param {type:\"string\"}\n", |
| 105 | + "DATASET = \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" #@param {type:\"string\"}\n", |
110 | 106 | "\n",
|
111 | 107 | "from google.colab import drive\n",
|
112 | 108 | "drive.mount('/content/drive')\n",
|
|
141 | 137 | "#@markdown 模型名\n",
|
142 | 138 | "MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
143 | 139 | "#@markdown 模型epoch\n",
|
144 |
| - "MODELEPOCH = 3540 #@param {type:\"integer\"}\n", |
| 140 | + "MODELEPOCH = 6600 #@param {type:\"integer\"}\n", |
145 | 141 | "\n",
|
146 | 142 | "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
147 | 143 | "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
|
|
165 | 161 | "#@markdown 模型名\n",
|
166 | 162 | "MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
167 | 163 | "#@markdown 模型epoch\n",
|
168 |
| - "MODELEPOCH = 730 #@param {type:\"integer\"}\n", |
| 164 | + "MODELEPOCH = 250 #@param {type:\"integer\"}\n", |
| 165 | + "\n", |
| 166 | + "!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n", |
169 | 167 | "\n",
|
170 | 168 | "!cp /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
|
171 |
| - "!cp /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth" |
| 169 | + "!cp /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n", |
| 170 | + "!cp /content/drive/MyDrive/*.index /content/\n", |
| 171 | + "!cp /content/drive/MyDrive/*.npy /content/\n", |
| 172 | + "!cp /content/drive/MyDrive/{MODELNAME}{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/weights/{MODELNAME}.pth" |
172 | 173 | ]
|
173 | 174 | },
|
174 | 175 | {
|
|
178 | 179 | "id": "ZKAyuKb9J6dz"
|
179 | 180 | },
|
180 | 181 | "outputs": [],
|
| 182 | + "source": [ |
| 183 | + "#@title 手动预处理(不推荐)\n", |
| 184 | + "#@markdown 模型名\n", |
| 185 | + "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 186 | + "\n", |
| 187 | + "!python3 trainset_preprocess_pipeline_print.py /content/dataset 32000 8 logs/{MODELNAME} True\n" |
| 188 | + ] |
| 189 | + }, |
| 190 | + { |
| 191 | + "cell_type": "code", |
| 192 | + "execution_count": null, |
| 193 | + "metadata": { |
| 194 | + "id": "CrxJqzAUKmPJ" |
| 195 | + }, |
| 196 | + "outputs": [], |
| 197 | + "source": [ |
| 198 | + "#@title 手动提取特征(不推荐)\n", |
| 199 | + "#@markdown 模型名\n", |
| 200 | + "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 201 | + "\n", |
| 202 | + "!python3 extract_feature_print.py 1 0 0 logs/{MODELNAME}\n" |
| 203 | + ] |
| 204 | + }, |
| 205 | + { |
| 206 | + "cell_type": "code", |
| 207 | + "execution_count": null, |
| 208 | + "metadata": { |
| 209 | + "id": "IMLPLKOaKj58" |
| 210 | + }, |
| 211 | + "outputs": [], |
181 | 212 | "source": [
|
182 | 213 | "#@title 手动训练(不推荐)\n",
|
183 | 214 | "#@markdown 模型名\n",
|
184 | 215 | "MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
| 216 | + "#@markdown 停止的epoch\n", |
| 217 | + "MODELEPOCH = 700 #@param {type:\"integer\"}\n", |
| 218 | + "#@markdown 保存epoch间隔\n", |
| 219 | + "EPOCHSAVE = 20 #@param {type:\"integer\"}\n", |
| 220 | + "#@markdown 采样率\n", |
| 221 | + "MODELSAMPLE = \"48k\" #@param {type:\"string\"}\n", |
| 222 | + "\n", |
| 223 | + "!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" |
| 224 | + ] |
| 225 | + }, |
| 226 | + { |
| 227 | + "cell_type": "code", |
| 228 | + "execution_count": null, |
| 229 | + "metadata": { |
| 230 | + "id": "haYA81hySuDl" |
| 231 | + }, |
| 232 | + "outputs": [], |
| 233 | + "source": [ |
| 234 | + "#@title 删除其它pth,只留选中的(慎点,仔细看代码)\n", |
| 235 | + "#@markdown 模型名\n", |
| 236 | + "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 237 | + "#@markdown 选中模型epoch\n", |
| 238 | + "MODELEPOCH = 6600 #@param {type:\"integer\"}\n", |
| 239 | + "\n", |
| 240 | + "!echo \"备份选中的模型。。。\"\n", |
| 241 | + "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n", |
| 242 | + "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/{MODELNAME}_G_{MODELEPOCH}.pth\n", |
| 243 | + "\n", |
| 244 | + "!echo \"正在删除。。。\"\n", |
| 245 | + "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n", |
| 246 | + "!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n", |
| 247 | + "\n", |
| 248 | + "!echo \"恢复选中的模型。。。\"\n", |
| 249 | + "!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth \n", |
| 250 | + "!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n", |
| 251 | + "\n", |
| 252 | + "!echo \"删除完成\"\n", |
| 253 | + "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}" |
| 254 | + ] |
| 255 | + }, |
| 256 | + { |
| 257 | + "cell_type": "code", |
| 258 | + "execution_count": null, |
| 259 | + "metadata": { |
| 260 | + "id": "QhSiPTVPoIRh" |
| 261 | + }, |
| 262 | + "outputs": [], |
| 263 | + "source": [ |
| 264 | + "#@title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n", |
| 265 | + "#@markdown 模型名\n", |
| 266 | + "MODELNAME = \"lulu\" #@param {type:\"string\"}\n", |
| 267 | + "#@markdown 选中模型epoch\n", |
| 268 | + "MODELEPOCH = 1500 #@param {type:\"integer\"}\n", |
| 269 | + "\n", |
| 270 | + "!echo \"备份选中的模型。。。\"\n", |
| 271 | + "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n", |
| 272 | + "!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/{MODELNAME}_G_{MODELEPOCH}.pth\n", |
185 | 273 | "\n",
|
186 |
| - "!python3 trainset_preprocess_pipeline_print.py /content/dataset 32000 8 logs/{MODELNAME} True\n", |
| 274 | + "!echo \"正在删除。。。\"\n", |
| 275 | + "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n", |
| 276 | + "!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n", |
187 | 277 | "\n",
|
188 |
| - "!python3 extract_feature_print.py 1 0 0 logs/{MODELNAME}\n", |
| 278 | + "!echo \"恢复选中的模型。。。\"\n", |
| 279 | + "!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth \n", |
| 280 | + "!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n", |
189 | 281 | "\n",
|
190 |
| - "!python3 train_nsf_sim_cache_sid_load_pretrain.py -e lulu -sr 32k -f0 0 -g 0 -bs 4 -te 10 -se 5 -pg pretrained/G32k.pth -pd pretrained/D32k.pth -l 0 -c 0\n" |
| 282 | + "!echo \"删除完成\"\n", |
| 283 | + "!ls /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}" |
191 | 284 | ]
|
192 | 285 | }
|
193 | 286 | ],
|
|
0 commit comments