Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(notebook): update notebook #8

Merged
merged 2 commits into from
Mar 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion notebooks/so-vits-svc-fork-4.0.ipynb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cells":[{"cell_type":"markdown","metadata":{"id":"FDGoAN-ll_Il"},"source":["## Before training\n","\n","This program saves the last 3 generations of models to Google Drive. Since 1 generation of models is >1GB, you should have at least 3GB of free space in Google Drive. If you do not have such free space, it is recommended to create another Google Account.\n","\n","Training requires >10GB VRAM. (T4 should be enough) Inference does not require such a lot of VRAM."]},{"cell_type":"markdown","metadata":{"id":"2HOVoJZ7xA7v"},"source":["## Installation"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":919,"status":"ok","timestamp":1679020450327,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"EItSTxc6GxLv","outputId":"58aa2dc5-21a2-4618-beae-eab3a0ce7d5a"},"outputs":[],"source":["#@title Check GPU\n","!nvidia-smi"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":126843,"status":"ok","timestamp":1679020577168,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"ah5zv5MOCvIX","outputId":"e10caaae-4399-4774-ff43-06d29459a101"},"outputs":[{"ename":"","evalue":"","output_type":"error","traceback":["\u001b[1;31m'venv' でセルを実行するには、 ipykernel パッケージが必要です。\n","\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n","\u001b[1;31mCommand: 'c:/Users/m/MyMain/dev/so-vits-svc-fork/venv/Scripts/python.exe -m pip install ipykernel -U --force-reinstall'"]}],"source":["#@title Install dependencies\n","!python -m pip install -U pip wheel\n","%pip install -U ipython \n","\n","#@markdown Branch (for development)\n","BRANCH = \"none\" #@param {\"type\": \"string\"}\n","if BRANCH == \"none\":\n"," %pip install -U so-vits-svc-fork\n","else:\n"," %pip install -U git+https://github.com/34j/so-vits-svc-fork.git@{BRANCH}"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":405045,"status":"ok","timestamp":1679020982207,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"lf1eVKmuZRDW","outputId":"c8d9f10c-54e4-4024-91f9-0ce7d5910d93"},"outputs":[],"source":["#@title Mount Google Drive\n","from google.colab import drive\n","drive.mount('/content/drive')"]},{"cell_type":"markdown","metadata":{"id":"J5ttGhG3xEs3"},"source":["## Training"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":7,"status":"ok","timestamp":1679020982207,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"nnmmJvbDd5cn","outputId":"ca65956d-f7b1-431b-c615-a9f6eda7de7d"},"outputs":[],"source":["#@title Make dataset directory\n","%cd ./content"]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":257,"status":"ok","timestamp":1679022032794,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"9fM3Qj98DdR3"},"outputs":[],"source":["!mkdir -p \"dataset_raw/44k\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":10,"status":"ok","timestamp":1679020982692,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"s_YSBfkgbpsg","outputId":"7047b5e0-3c45-4304-ef80-fd51b11c1c05"},"outputs":[],"source":["#!rm -r \"dataset_raw/44k\"\n","#!rm -r \"dataset/44k\""]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":4761,"status":"ok","timestamp":1679022039601,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"Nfe6avQYZRDX"},"outputs":[],"source":["#@title Copy your dataset\n","DATASET_NAME = \"kiritan\" #@param {type: \"string\"}\n","!cp -R /content/drive/MyDrive/so-vits-svc-fork/dataset/{DATASET_NAME}/ -t \"dataset_raw/44k/\""]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":305,"status":"ok","timestamp":1679022049038,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"BIwjRthoDD7d"},"outputs":[],"source":["#@title Download dataset (Tsukuyomi-chan JVS)\n","#@markdown Make sure you agree to the license when using this dataset.\n","# !wget https://tyc.rei-yumesaki.net/files/sozai-tyc-corpus1.zip\n","# !unzip sozai-tyc-corpus1.zip\n","# !mv \"/content/つくよみちゃんコーパス Vol.1 声優統計コーパス(JVSコーパス準拠)/おまけ:WAV(+12dB増幅&高音域削減)/WAV(+12dB増幅&高音域削減)\" \"dataset_raw/44k/tsukuyomi\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":51465,"status":"ok","timestamp":1679022101694,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"VdNMJ8M4FYr7","outputId":"880c6760-9881-40e5-fa04-78d2e7434540"},"outputs":[],"source":["#@title Automatic preprocessing\n","!svc pre-resample"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1989,"status":"ok","timestamp":1679022163420,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"teJtVQ9XdQpO","outputId":"83a83997-7001-4dc1-fece-c1f1bb921c7e"},"outputs":[],"source":["!svc pre-config"]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":309,"status":"ok","timestamp":1679022165164,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"_jSyc0JE9o9S"},"outputs":[],"source":["#@title Copy configs file\n","!cp configs/44k/config.json drive/MyDrive/so-vits-svc-fork"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":80360,"status":"ok","timestamp":1679022247666,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"k7tSGI1Qeeeu","outputId":"93d04add-cff9-4a13-ff9d-444c76a33da8"},"outputs":[],"source":["!svc pre-hubert"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":32852,"status":"ok","timestamp":1679027583345,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"zV5KVp76FfHU","outputId":"aec67a90-be9c-4bbb-d612-39fb4c786d9d"},"outputs":[],"source":["#@title Train\n","#!svc train\n","!svc train --model-path drive/MyDrive/so-vits-svc-fork/logs/44k"]},{"cell_type":"markdown","metadata":{"id":"hNppB3pdxHPI"},"source":["## Inference"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1044,"status":"ok","timestamp":1679027672910,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"NJi_GF4UGWNU","outputId":"debfd307-2a09-488a-9ff2-10b70ce4883c"},"outputs":[],"source":["#@title Get the author's voice as a source\n","!wget \"https://github.com/34j/34j/raw/main/jvs-parallel100/99.wav\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":16588,"status":"ok","timestamp":1679027945708,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"_hacpmo7oKeQ","outputId":"b888e2b1-eb94-43b4-89a9-b38b6bc5f828"},"outputs":[],"source":["#@title Use trained model\n","#!svc infer 100.wav --speaker kiritan -m logs/44k/G_1600.pth\n","!svc infer 99.wav -t 16 --speaker kiritan -m drive/MyDrive/so-vits-svc-fork/logs/44k/G_4000.pth -c drive/MyDrive/so-vits-svc-fork/logs/44k/config.json"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"9CKxQXdyn5zg"},"outputs":[],"source":["#@title Use pretrained model\n","!wget -O \"https://huggingface.co/therealvul/so-vits-svc-4.0/resolve/main/Pinkie%20(speaking%20sep)/G_166400.pth\"\n","!wget -O \"https://huggingface.co/therealvul/so-vits-svc-4.0/resolve/main/Pinkie%20(speaking%20sep)/config.json\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1727,"status":"ok","timestamp":1679021000057,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"Rajxfht4-pjB","outputId":"51efd477-699b-43c0-ec7f-d9bdc5efb534"},"outputs":[],"source":["\n","!svc infer 100.wav --speaker \"Pinkie {neutral}\" -m G_166400.pth -c config.json"]}],"metadata":{"accelerator":"GPU","colab":{"provenance":[{"file_id":"https://github.com/34j/so-vits-svc-fork/blob/feat%2Fmain-feat/so-vits-svc-fork-4.0.ipynb","timestamp":1678970434570}]},"gpuClass":"standard","kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.10"}},"nbformat":4,"nbformat_minor":0}
{"cells":[{"cell_type":"markdown","metadata":{"id":"FDGoAN-ll_Il"},"source":["## Before training\n","\n","This program saves the last 3 generations of models to Google Drive. Since 1 generation of models is >1GB, you should have at least 3GB of free space in Google Drive. If you do not have such free space, it is recommended to create another Google Account.\n","\n","Training requires >10GB VRAM. (T4 should be enough) Inference does not require such a lot of VRAM."]},{"cell_type":"markdown","metadata":{"id":"2HOVoJZ7xA7v"},"source":["## Installation"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":919,"status":"ok","timestamp":1679020450327,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"EItSTxc6GxLv","outputId":"58aa2dc5-21a2-4618-beae-eab3a0ce7d5a"},"outputs":[],"source":["#@title Check GPU\n","!nvidia-smi"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":126843,"status":"ok","timestamp":1679020577168,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"ah5zv5MOCvIX","outputId":"e10caaae-4399-4774-ff43-06d29459a101"},"outputs":[],"source":["#@title Install dependencies\n","!python -m pip install -U pip wheel\n","%pip install -U ipython \n","\n","#@markdown Branch (for development)\n","BRANCH = \"none\" #@param {\"type\": \"string\"}\n","if BRANCH == \"none\":\n"," %pip install -U so-vits-svc-fork\n","else:\n"," %pip install -U git+https://github.com/34j/so-vits-svc-fork.git@{BRANCH}"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":405045,"status":"ok","timestamp":1679020982207,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"lf1eVKmuZRDW","outputId":"c8d9f10c-54e4-4024-91f9-0ce7d5910d93"},"outputs":[],"source":["#@title Mount Google Drive\n","from google.colab import drive\n","drive.mount('/content/drive')"]},{"cell_type":"markdown","metadata":{"id":"J5ttGhG3xEs3"},"source":["## Training"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":7,"status":"ok","timestamp":1679020982207,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"nnmmJvbDd5cn","outputId":"ca65956d-f7b1-431b-c615-a9f6eda7de7d"},"outputs":[],"source":["#@title Make dataset directory\n","%cd ./content"]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":257,"status":"ok","timestamp":1679022032794,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"9fM3Qj98DdR3"},"outputs":[],"source":["!mkdir -p \"dataset_raw/44k\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":10,"status":"ok","timestamp":1679020982692,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"s_YSBfkgbpsg","outputId":"7047b5e0-3c45-4304-ef80-fd51b11c1c05"},"outputs":[],"source":["#!rm -r \"dataset_raw/44k\"\n","#!rm -r \"dataset/44k\""]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":4761,"status":"ok","timestamp":1679022039601,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"Nfe6avQYZRDX"},"outputs":[],"source":["#@title Copy your dataset\n","DATASET_NAME = \"kiritan\" #@param {type: \"string\"}\n","!cp -R /content/drive/MyDrive/so-vits-svc-fork/dataset/{DATASET_NAME}/ -t \"dataset_raw/44k/\""]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":305,"status":"ok","timestamp":1679022049038,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"BIwjRthoDD7d"},"outputs":[],"source":["#@title Download dataset (Tsukuyomi-chan JVS)\n","#@markdown Make sure you agree to the license when using this dataset.\n","# !wget https://tyc.rei-yumesaki.net/files/sozai-tyc-corpus1.zip\n","# !unzip sozai-tyc-corpus1.zip\n","# !mv \"/content/つくよみちゃんコーパス Vol.1 声優統計コーパス(JVSコーパス準拠)/おまけ:WAV(+12dB増幅&高音域削減)/WAV(+12dB増幅&高音域削減)\" \"dataset_raw/44k/tsukuyomi\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":51465,"status":"ok","timestamp":1679022101694,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"VdNMJ8M4FYr7","outputId":"880c6760-9881-40e5-fa04-78d2e7434540"},"outputs":[],"source":["#@title Automatic preprocessing\n","!svc pre-resample"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1989,"status":"ok","timestamp":1679022163420,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"teJtVQ9XdQpO","outputId":"83a83997-7001-4dc1-fece-c1f1bb921c7e"},"outputs":[],"source":["!svc pre-config"]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":309,"status":"ok","timestamp":1679022165164,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"_jSyc0JE9o9S"},"outputs":[],"source":["#@title Copy configs file\n","!cp configs/44k/config.json drive/MyDrive/so-vits-svc-fork"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":80360,"status":"ok","timestamp":1679022247666,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"k7tSGI1Qeeeu","outputId":"93d04add-cff9-4a13-ff9d-444c76a33da8"},"outputs":[],"source":["!svc pre-hubert"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":32852,"status":"ok","timestamp":1679027583345,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"zV5KVp76FfHU","outputId":"aec67a90-be9c-4bbb-d612-39fb4c786d9d"},"outputs":[],"source":["#@title Train\n","!svc train --model-path drive/MyDrive/so-vits-svc-fork/logs/44k"]},{"cell_type":"markdown","metadata":{"id":"hNppB3pdxHPI"},"source":["## Inference"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1044,"status":"ok","timestamp":1679027672910,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"NJi_GF4UGWNU","outputId":"debfd307-2a09-488a-9ff2-10b70ce4883c"},"outputs":[],"source":["#@title Get the author's voice as a source\n","!wget \"https://github.com/34j/34j/raw/main/jvs-parallel100/100.wav\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":16588,"status":"ok","timestamp":1679027945708,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"_hacpmo7oKeQ","outputId":"b888e2b1-eb94-43b4-89a9-b38b6bc5f828"},"outputs":[],"source":["#@title Use trained model\n","!svc infer 100.wav -m drive/MyDrive/so-vits-svc-fork/logs/44k/ -c drive/MyDrive/so-vits-svc-fork/logs/44k/config.json"]},{"attachments":{},"cell_type":"markdown","metadata":{},"source":["### Pretrained models"]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["#@title\n","!wget -O \"https://huggingface.co/TachibanaKimika/so-vits-svc-4.0-models/resolve/main/hibiki/G_hibiki_100.pth\"\n","!wget -O \"https://huggingface.co/TachibanaKimika/so-vits-svc-4.0-models/resolve/main/hibiki/config.json\""]},{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["!svc infer 100.wav -m G_hibiki_100.pth -c config.json"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"9CKxQXdyn5zg"},"outputs":[],"source":["#@title Pinkie\n","!wget -O \"https://huggingface.co/therealvul/so-vits-svc-4.0/resolve/main/Pinkie%20(speaking%20sep)/G_166400.pth\"\n","!wget -O \"https://huggingface.co/therealvul/so-vits-svc-4.0/resolve/main/Pinkie%20(speaking%20sep)/config.json\""]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":1727,"status":"ok","timestamp":1679021000057,"user":{"displayName":"ああ","userId":"12005009733164811990"},"user_tz":-540},"id":"Rajxfht4-pjB","outputId":"51efd477-699b-43c0-ec7f-d9bdc5efb534"},"outputs":[],"source":["\n","!svc infer 100.wav --speaker \"Pinkie {neutral}\" -m G_166400.pth -c config.json"]}],"metadata":{"accelerator":"GPU","colab":{"provenance":[{"file_id":"https://github.com/34j/so-vits-svc-fork/blob/feat%2Fmain-feat/so-vits-svc-fork-4.0.ipynb","timestamp":1678970434570}]},"gpuClass":"standard","kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.10"}},"nbformat":4,"nbformat_minor":0}