Setting up the Environment
Last updated
Was this helpful?
Last updated
Was this helpful?
Setting up the environment is probably the "hardest" part for many people.
To avoid conflict with other projects, it's recommended to use a virtual environment. We will use in this guide, you can also use or other options if you are familiar with them.
Download and install Anaconda:
Run this command to create a virtual environment with Python 3.8 named diff-svc (you can also use other names):
Next, run this command to activate the virtual environment you just created:
If the next line starts with (diff-svc)
, the virtual environment is activated successfully.
Go to Diff-SVC's , click on code -> Download ZIP
Alternativly, use git clone if you know what it is
Do NOT download from Releases, it's not the latest version.
Extract the zip file, you should now have a diff-svc-main folder.
Run this command to install PyTorch:
Run this command to install other required packages:
Tensorboard helps you visualize training. This step is not required for the program to function but it's recommended to do.
Run this command in the diff-svc environment to install Tensorboard.
Run this command to install Jupyter Notebook
To make the diff-svc environment visible in Jupyter, you need to create a kernel.
Run this command to install ipykernel:
Create a kernel named diff-svc
(you can also use other names):
You also need to download some model checkpoints and place them correctly.
Get checkpoints.zip from the Diff-SVC Discord server or some other mirror links online.
Extract the folders inside and put them under a folder called checkpoints
under your diff-svc folder.
Extract the zip file and put the nsf_hifigan
folder under checkpoints
.
(The 24kHz vocoder is not needed in this case, but you can also keep it there)
to the diff-svc-main folder in the command line and make sure you are in the diff-svc
environment.
This command may not apply to everyone. You can run nvidia-smi
to check the highest supported CUDA version of your GPU, then use the command from to download the corresponding version.
If you are on a Windows machine, you may encounter an error that says Microsoft Visual C++ 14.0 or greater is required
when building webrtcvad
. You can follow the instruction on the error message and install or just install .
One of the options for inference is using . This step is not required if you want to use other tools for inference or if you want to use other programs (like ) that also support Jupyter Notebook. You may decide if you want to do it this way and come back later.
(If you want to train a 44.1kHz model), you should also download the 44.1kHz vocoder from . (You only need nsf_hifigan_xxxxxx.zip
, ignore the "finetune" and "onnx" ones)