From cf6a46e99df6ec41e90fa3c85c1cbe6414808815 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Tue, 23 May 2023 20:28:01 +0800 Subject: [PATCH] fix(colab): download hifigan if not exist --- sovits4_for_colab.ipynb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/sovits4_for_colab.ipynb b/sovits4_for_colab.ipynb index 38b0fcb..ee21b16 100644 --- a/sovits4_for_colab.ipynb +++ b/sovits4_for_colab.ipynb @@ -460,6 +460,21 @@ "#@markdown\n", "\n", "%cd /content/so-vits-svc\n", + "\n", + "import os\n", + "if not os.path.exists(\"./pretrain/nsf_hifigan/model\"):\n", + " !curl -L https://github.com/openvpi/vocoders/releases/download/nsf-hifigan-v1/nsf_hifigan_20221211.zip -o nsf_hifigan_20221211.zip\n", + " !unzip nsf_hifigan_20221211.zip\n", + " !rm -rf pretrain/nsf_hifigan\n", + " !mv -v nsf_hifigan pretrain\n", + "\n", + "#@markdown Whether to enable tensorboard\n", + "tensorboard_on = True #@param {type:\"boolean\"}\n", + "\n", + "if tensorboard_on:\n", + " %load_ext tensorboard\n", + " %tensorboard --logdir logs/44k\n", + "\n", "!python train_diff.py -c configs/diffusion.yaml" ] },