mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-01-01 12:35:04 +08:00
👷 Use black[jupyter]
(#847)
* 👷 Use black[jupyter] * 👷 Add missing matrix
This commit is contained in:
parent
18067aa85d
commit
ffc99dbd32
14
.github/workflows/pull_format.yml
vendored
14
.github/workflows/pull_format.yml
vendored
@ -4,10 +4,19 @@ on: [pull_request]
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pull_format:
|
pull_format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.10"]
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -16,14 +25,13 @@ jobs:
|
|||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install Black
|
- name: Install Black
|
||||||
run: pip install black
|
run: pip install "black[jupyter]"
|
||||||
|
|
||||||
- name: Run Black
|
- name: Run Black
|
||||||
# run: black $(git ls-files '*.py')
|
# run: black $(git ls-files '*.py')
|
||||||
|
12
.github/workflows/push_format.yml
vendored
12
.github/workflows/push_format.yml
vendored
@ -8,9 +8,17 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_format:
|
push_format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: ["3.10"]
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -22,7 +30,7 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install Black
|
- name: Install Black
|
||||||
run: pip install black
|
run: pip install "black[jupyter]"
|
||||||
|
|
||||||
- name: Run Black
|
- name: Run Black
|
||||||
# run: black $(git ls-files '*.py')
|
# run: black $(git ls-files '*.py')
|
||||||
|
@ -34,14 +34,14 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 查看显卡\n",
|
"# @title 查看显卡\n",
|
||||||
"!nvidia-smi"
|
"!nvidia-smi"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 安装依赖\n",
|
"# @title 安装依赖\n",
|
||||||
"!apt-get -y install build-essential python3-dev ffmpeg\n",
|
"!apt-get -y install build-essential python3-dev ffmpeg\n",
|
||||||
"!pip3 install --upgrade setuptools wheel\n",
|
"!pip3 install --upgrade setuptools wheel\n",
|
||||||
"!pip3 install --upgrade pip\n",
|
"!pip3 install --upgrade pip\n",
|
||||||
@ -56,7 +56,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 克隆仓库\n",
|
"# @title 克隆仓库\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!git clone --depth=1 -b stable https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI\n",
|
"!git clone --depth=1 -b stable https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI\n",
|
||||||
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
||||||
@ -71,7 +71,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 更新仓库(一般无需执行)\n",
|
"# @title 更新仓库(一般无需执行)\n",
|
||||||
"!git pull"
|
"!git pull"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
@ -83,7 +83,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 安装aria2\n",
|
"# @title 安装aria2\n",
|
||||||
"!apt -y install -qq aria2"
|
"!apt -y install -qq aria2"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
@ -95,7 +95,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 下载底模\n",
|
"# @title 下载底模\n",
|
||||||
"!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",
|
"!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",
|
||||||
"!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",
|
"!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",
|
||||||
"!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",
|
"!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",
|
||||||
@ -118,7 +118,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 下载人声分离模型\n",
|
"# @title 下载人声分离模型\n",
|
||||||
"!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",
|
"!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",
|
||||||
"!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"
|
"!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"
|
||||||
],
|
],
|
||||||
@ -131,7 +131,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 下载hubert_base\n",
|
"# @title 下载hubert_base\n",
|
||||||
"!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"
|
"!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"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
@ -143,10 +143,11 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 挂载谷歌云盘\n",
|
"# @title 挂载谷歌云盘\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from google.colab import drive\n",
|
"from google.colab import drive\n",
|
||||||
"drive.mount('/content/drive')"
|
"\n",
|
||||||
|
"drive.mount(\"/content/drive\")"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "jwu07JgqoFON"
|
"id": "jwu07JgqoFON"
|
||||||
@ -157,10 +158,12 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 从谷歌云盘加载打包好的数据集到/content/dataset\n",
|
"# @title 从谷歌云盘加载打包好的数据集到/content/dataset\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#@markdown 数据集位置\n",
|
"# @markdown 数据集位置\n",
|
||||||
"DATASET = \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" #@param {type:\"string\"}\n",
|
"DATASET = (\n",
|
||||||
|
" \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" # @param {type:\"string\"}\n",
|
||||||
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!mkdir -p /content/dataset\n",
|
"!mkdir -p /content/dataset\n",
|
||||||
"!unzip -d /content/dataset -B {DATASET}"
|
"!unzip -d /content/dataset -B {DATASET}"
|
||||||
@ -174,7 +177,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 重命名数据集中的重名文件\n",
|
"# @title 重命名数据集中的重名文件\n",
|
||||||
"!ls -a /content/dataset/\n",
|
"!ls -a /content/dataset/\n",
|
||||||
"!rename 's/(\\w+)\\.(\\w+)~(\\d*)/$1_$3.$2/' /content/dataset/*.*~*"
|
"!rename 's/(\\w+)\\.(\\w+)~(\\d*)/$1_$3.$2/' /content/dataset/*.*~*"
|
||||||
],
|
],
|
||||||
@ -187,7 +190,7 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 启动web\n",
|
"# @title 启动web\n",
|
||||||
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
||||||
"# %load_ext tensorboard\n",
|
"# %load_ext tensorboard\n",
|
||||||
"# %tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs\n",
|
"# %tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs\n",
|
||||||
@ -202,13 +205,13 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动将训练后的模型文件备份到谷歌云盘\n",
|
"# @title 手动将训练后的模型文件备份到谷歌云盘\n",
|
||||||
"#@markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
"# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 模型epoch\n",
|
"# @markdown 模型epoch\n",
|
||||||
"MODELEPOCH = 9600 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
|
||||||
@ -226,13 +229,13 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 从谷歌云盘恢复pth\n",
|
"# @title 从谷歌云盘恢复pth\n",
|
||||||
"#@markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
"# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 模型epoch\n",
|
"# @markdown 模型epoch\n",
|
||||||
"MODELEPOCH = 7500 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 7500 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
|
"!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -251,15 +254,15 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动预处理(不推荐)\n",
|
"# @title 手动预处理(不推荐)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 采样率\n",
|
"# @markdown 采样率\n",
|
||||||
"BITRATE = 48000 #@param {type:\"integer\"}\n",
|
"BITRATE = 48000 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 使用的进程数\n",
|
"# @markdown 使用的进程数\n",
|
||||||
"THREADCOUNT = 8 #@param {type:\"integer\"}\n",
|
"THREADCOUNT = 8 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True\n"
|
"!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "ZKAyuKb9J6dz"
|
"id": "ZKAyuKb9J6dz"
|
||||||
@ -270,17 +273,17 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动提取特征(不推荐)\n",
|
"# @title 手动提取特征(不推荐)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 使用的进程数\n",
|
"# @markdown 使用的进程数\n",
|
||||||
"THREADCOUNT = 8 #@param {type:\"integer\"}\n",
|
"THREADCOUNT = 8 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 音高提取算法\n",
|
"# @markdown 音高提取算法\n",
|
||||||
"ALGO = \"harvest\" #@param {type:\"string\"}\n",
|
"ALGO = \"harvest\" # @param {type:\"string\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n",
|
"!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}\n"
|
"!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "CrxJqzAUKmPJ"
|
"id": "CrxJqzAUKmPJ"
|
||||||
@ -291,25 +294,25 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动训练(不推荐)\n",
|
"# @title 手动训练(不推荐)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 使用的GPU\n",
|
"# @markdown 使用的GPU\n",
|
||||||
"USEGPU = \"0\" #@param {type:\"string\"}\n",
|
"USEGPU = \"0\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 批大小\n",
|
"# @markdown 批大小\n",
|
||||||
"BATCHSIZE = 32 #@param {type:\"integer\"}\n",
|
"BATCHSIZE = 32 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 停止的epoch\n",
|
"# @markdown 停止的epoch\n",
|
||||||
"MODELEPOCH = 3200 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 3200 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 保存epoch间隔\n",
|
"# @markdown 保存epoch间隔\n",
|
||||||
"EPOCHSAVE = 100 #@param {type:\"integer\"}\n",
|
"EPOCHSAVE = 100 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 采样率\n",
|
"# @markdown 采样率\n",
|
||||||
"MODELSAMPLE = \"48k\" #@param {type:\"string\"}\n",
|
"MODELSAMPLE = \"48k\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 是否缓存训练集\n",
|
"# @markdown 是否缓存训练集\n",
|
||||||
"CACHEDATA = 1 #@param {type:\"integer\"}\n",
|
"CACHEDATA = 1 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 是否仅保存最新的ckpt文件\n",
|
"# @markdown 是否仅保存最新的ckpt文件\n",
|
||||||
"ONLYLATEST = 0 #@param {type:\"integer\"}\n",
|
"ONLYLATEST = 0 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!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"
|
"!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}"
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"id": "IMLPLKOaKj58"
|
"id": "IMLPLKOaKj58"
|
||||||
@ -320,11 +323,11 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 删除其它pth,只留选中的(慎点,仔细看代码)\n",
|
"# @title 删除其它pth,只留选中的(慎点,仔细看代码)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 选中模型epoch\n",
|
"# @markdown 选中模型epoch\n",
|
||||||
"MODELEPOCH = 9600 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"备份选中的模型。。。\"\n",
|
"!echo \"备份选中的模型。。。\"\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
||||||
@ -335,7 +338,7 @@
|
|||||||
"!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n",
|
"!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"恢复选中的模型。。。\"\n",
|
"!echo \"恢复选中的模型。。。\"\n",
|
||||||
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth \n",
|
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
|
||||||
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"删除完成\"\n",
|
"!echo \"删除完成\"\n",
|
||||||
@ -350,11 +353,11 @@
|
|||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n",
|
"# @title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 选中模型epoch\n",
|
"# @markdown 选中模型epoch\n",
|
||||||
"MODELEPOCH = 9600 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"备份选中的模型。。。\"\n",
|
"!echo \"备份选中的模型。。。\"\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
||||||
@ -365,7 +368,7 @@
|
|||||||
"!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n",
|
"!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"恢复选中的模型。。。\"\n",
|
"!echo \"恢复选中的模型。。。\"\n",
|
||||||
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth \n",
|
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
|
||||||
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"删除完成\"\n",
|
"!echo \"删除完成\"\n",
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 查看显卡\n",
|
"# @title 查看显卡\n",
|
||||||
"!nvidia-smi"
|
"!nvidia-smi"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -30,7 +30,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 安装依赖\n",
|
"# @title 安装依赖\n",
|
||||||
"!apt-get -y install build-essential python3-dev ffmpeg\n",
|
"!apt-get -y install build-essential python3-dev ffmpeg\n",
|
||||||
"!pip3 install --upgrade setuptools wheel\n",
|
"!pip3 install --upgrade setuptools wheel\n",
|
||||||
"!pip3 install --upgrade pip\n",
|
"!pip3 install --upgrade pip\n",
|
||||||
@ -45,13 +45,13 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 克隆仓库\n",
|
"# @title 克隆仓库\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!mkdir Retrieval-based-Voice-Conversion-WebUI\n",
|
"!mkdir Retrieval-based-Voice-Conversion-WebUI\n",
|
||||||
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
||||||
"!git init\n",
|
"!git init\n",
|
||||||
"!git remote add origin https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git\n",
|
"!git remote add origin https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git\n",
|
||||||
"!git fetch origin cfd984812804ddc9247d65b14c82cd32e56c1133 --depth=1 \n",
|
"!git fetch origin cfd984812804ddc9247d65b14c82cd32e56c1133 --depth=1\n",
|
||||||
"!git reset --hard FETCH_HEAD"
|
"!git reset --hard FETCH_HEAD"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -63,7 +63,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 更新仓库(一般无需执行)\n",
|
"# @title 更新仓库(一般无需执行)\n",
|
||||||
"!git pull"
|
"!git pull"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -75,7 +75,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 安装aria2\n",
|
"# @title 安装aria2\n",
|
||||||
"!apt -y install -qq aria2"
|
"!apt -y install -qq aria2"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -87,7 +87,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 下载底模\n",
|
"# @title 下载底模\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# v1\n",
|
"# v1\n",
|
||||||
"!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",
|
"!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",
|
||||||
@ -103,7 +103,7 @@
|
|||||||
"!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",
|
"!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",
|
||||||
"!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",
|
"!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",
|
||||||
"\n",
|
"\n",
|
||||||
"#v2\n",
|
"# v2\n",
|
||||||
"# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D32k.pth\n",
|
"# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D32k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D32k.pth\n",
|
||||||
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D40k.pth\n",
|
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D40k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D40k.pth\n",
|
||||||
"# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D48k.pth\n",
|
"# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/pretrained_v2/D48k.pth -d /content/Retrieval-based-Voice-Conversion-WebUI/pretrained_v2 -o D48k.pth\n",
|
||||||
@ -126,7 +126,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 下载人声分离模型\n",
|
"# @title 下载人声分离模型\n",
|
||||||
"!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",
|
"!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",
|
||||||
"!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"
|
"!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"
|
||||||
]
|
]
|
||||||
@ -139,7 +139,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 下载hubert_base\n",
|
"# @title 下载hubert_base\n",
|
||||||
"!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"
|
"!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"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -151,10 +151,11 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 挂载谷歌云盘\n",
|
"# @title 挂载谷歌云盘\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from google.colab import drive\n",
|
"from google.colab import drive\n",
|
||||||
"drive.mount('/content/drive')"
|
"\n",
|
||||||
|
"drive.mount(\"/content/drive\")"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -165,10 +166,12 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 从谷歌云盘加载打包好的数据集到/content/dataset\n",
|
"# @title 从谷歌云盘加载打包好的数据集到/content/dataset\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#@markdown 数据集位置\n",
|
"# @markdown 数据集位置\n",
|
||||||
"DATASET = \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" #@param {type:\"string\"}\n",
|
"DATASET = (\n",
|
||||||
|
" \"/content/drive/MyDrive/dataset/lulu20230327_32k.zip\" # @param {type:\"string\"}\n",
|
||||||
|
")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!mkdir -p /content/dataset\n",
|
"!mkdir -p /content/dataset\n",
|
||||||
"!unzip -d /content/dataset -B {DATASET}"
|
"!unzip -d /content/dataset -B {DATASET}"
|
||||||
@ -182,7 +185,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 重命名数据集中的重名文件\n",
|
"# @title 重命名数据集中的重名文件\n",
|
||||||
"!ls -a /content/dataset/\n",
|
"!ls -a /content/dataset/\n",
|
||||||
"!rename 's/(\\w+)\\.(\\w+)~(\\d*)/$1_$3.$2/' /content/dataset/*.*~*"
|
"!rename 's/(\\w+)\\.(\\w+)~(\\d*)/$1_$3.$2/' /content/dataset/*.*~*"
|
||||||
]
|
]
|
||||||
@ -195,7 +198,7 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 启动web\n",
|
"# @title 启动web\n",
|
||||||
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
"%cd /content/Retrieval-based-Voice-Conversion-WebUI\n",
|
||||||
"# %load_ext tensorboard\n",
|
"# %load_ext tensorboard\n",
|
||||||
"# %tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs\n",
|
"# %tensorboard --logdir /content/Retrieval-based-Voice-Conversion-WebUI/logs\n",
|
||||||
@ -210,13 +213,13 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动将训练后的模型文件备份到谷歌云盘\n",
|
"# @title 手动将训练后的模型文件备份到谷歌云盘\n",
|
||||||
"#@markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
"# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 模型epoch\n",
|
"# @markdown 模型epoch\n",
|
||||||
"MODELEPOCH = 9600 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth /content/drive/MyDrive/{MODELNAME}_G_{MODELEPOCH}.pth\n",
|
||||||
@ -234,13 +237,13 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 从谷歌云盘恢复pth\n",
|
"# @title 从谷歌云盘恢复pth\n",
|
||||||
"#@markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
"# @markdown 需要自己查看logs文件夹下模型的文件名,手动修改下方命令末尾的文件名\n",
|
||||||
"\n",
|
"\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 模型epoch\n",
|
"# @markdown 模型epoch\n",
|
||||||
"MODELEPOCH = 7500 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 7500 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
|
"!mkdir -p /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -259,15 +262,15 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动预处理(不推荐)\n",
|
"# @title 手动预处理(不推荐)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 采样率\n",
|
"# @markdown 采样率\n",
|
||||||
"BITRATE = 48000 #@param {type:\"integer\"}\n",
|
"BITRATE = 48000 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 使用的进程数\n",
|
"# @markdown 使用的进程数\n",
|
||||||
"THREADCOUNT = 8 #@param {type:\"integer\"}\n",
|
"THREADCOUNT = 8 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True\n"
|
"!python3 trainset_preprocess_pipeline_print.py /content/dataset {BITRATE} {THREADCOUNT} logs/{MODELNAME} True"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -278,17 +281,17 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动提取特征(不推荐)\n",
|
"# @title 手动提取特征(不推荐)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 使用的进程数\n",
|
"# @markdown 使用的进程数\n",
|
||||||
"THREADCOUNT = 8 #@param {type:\"integer\"}\n",
|
"THREADCOUNT = 8 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 音高提取算法\n",
|
"# @markdown 音高提取算法\n",
|
||||||
"ALGO = \"harvest\" #@param {type:\"string\"}\n",
|
"ALGO = \"harvest\" # @param {type:\"string\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n",
|
"!python3 extract_f0_print.py logs/{MODELNAME} {THREADCOUNT} {ALGO}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}\n"
|
"!python3 extract_feature_print.py cpu 1 0 0 logs/{MODELNAME}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -299,25 +302,25 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 手动训练(不推荐)\n",
|
"# @title 手动训练(不推荐)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 使用的GPU\n",
|
"# @markdown 使用的GPU\n",
|
||||||
"USEGPU = \"0\" #@param {type:\"string\"}\n",
|
"USEGPU = \"0\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 批大小\n",
|
"# @markdown 批大小\n",
|
||||||
"BATCHSIZE = 32 #@param {type:\"integer\"}\n",
|
"BATCHSIZE = 32 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 停止的epoch\n",
|
"# @markdown 停止的epoch\n",
|
||||||
"MODELEPOCH = 3200 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 3200 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 保存epoch间隔\n",
|
"# @markdown 保存epoch间隔\n",
|
||||||
"EPOCHSAVE = 100 #@param {type:\"integer\"}\n",
|
"EPOCHSAVE = 100 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 采样率\n",
|
"# @markdown 采样率\n",
|
||||||
"MODELSAMPLE = \"48k\" #@param {type:\"string\"}\n",
|
"MODELSAMPLE = \"48k\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 是否缓存训练集\n",
|
"# @markdown 是否缓存训练集\n",
|
||||||
"CACHEDATA = 1 #@param {type:\"integer\"}\n",
|
"CACHEDATA = 1 # @param {type:\"integer\"}\n",
|
||||||
"#@markdown 是否仅保存最新的ckpt文件\n",
|
"# @markdown 是否仅保存最新的ckpt文件\n",
|
||||||
"ONLYLATEST = 0 #@param {type:\"integer\"}\n",
|
"ONLYLATEST = 0 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!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"
|
"!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}"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -328,11 +331,11 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 删除其它pth,只留选中的(慎点,仔细看代码)\n",
|
"# @title 删除其它pth,只留选中的(慎点,仔细看代码)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 选中模型epoch\n",
|
"# @markdown 选中模型epoch\n",
|
||||||
"MODELEPOCH = 9600 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"备份选中的模型。。。\"\n",
|
"!echo \"备份选中的模型。。。\"\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
||||||
@ -343,7 +346,7 @@
|
|||||||
"!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n",
|
"!rm /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*.pth\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"恢复选中的模型。。。\"\n",
|
"!echo \"恢复选中的模型。。。\"\n",
|
||||||
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth \n",
|
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
|
||||||
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"删除完成\"\n",
|
"!echo \"删除完成\"\n",
|
||||||
@ -358,11 +361,11 @@
|
|||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"#@title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n",
|
"# @title 清除项目下所有文件,只留选中的模型(慎点,仔细看代码)\n",
|
||||||
"#@markdown 模型名\n",
|
"# @markdown 模型名\n",
|
||||||
"MODELNAME = \"lulu\" #@param {type:\"string\"}\n",
|
"MODELNAME = \"lulu\" # @param {type:\"string\"}\n",
|
||||||
"#@markdown 选中模型epoch\n",
|
"# @markdown 选中模型epoch\n",
|
||||||
"MODELEPOCH = 9600 #@param {type:\"integer\"}\n",
|
"MODELEPOCH = 9600 # @param {type:\"integer\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"备份选中的模型。。。\"\n",
|
"!echo \"备份选中的模型。。。\"\n",
|
||||||
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
"!cp /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth /content/{MODELNAME}_D_{MODELEPOCH}.pth\n",
|
||||||
@ -373,7 +376,7 @@
|
|||||||
"!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n",
|
"!rm -rf /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/*\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"恢复选中的模型。。。\"\n",
|
"!echo \"恢复选中的模型。。。\"\n",
|
||||||
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth \n",
|
"!mv /content/{MODELNAME}_D_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/G_{MODELEPOCH}.pth\n",
|
||||||
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
"!mv /content/{MODELNAME}_G_{MODELEPOCH}.pth /content/Retrieval-based-Voice-Conversion-WebUI/logs/{MODELNAME}/D_{MODELEPOCH}.pth\n",
|
||||||
"\n",
|
"\n",
|
||||||
"!echo \"删除完成\"\n",
|
"!echo \"删除完成\"\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user