From a09f14726e416c17285fb3c3c916a1a99d4525be Mon Sep 17 00:00:00 2001 From: Aleksandr Mokrov Date: Thu, 5 Sep 2024 22:35:43 +0200 Subject: [PATCH 1/4] Fix fairseq issues on windows --- .../softvc-voice-conversion.ipynb | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb index 798f94371e3..b1462e02c95 100644 --- a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb +++ b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb @@ -40,7 +40,26 @@ "metadata": {}, "source": [ "## Prerequisites\n", - "[back to top ⬆️](#Table-of-contents:)\n" + "[back to top ⬆️](#Table-of-contents:)\n", + "This model has some problems with intallation. So, we have to downgrade `pip` to version below `24.1` to avoid problems with `fairseq`. Also, `fairseq` has some problems on `Windows` on `python>=3.11` and we use a custom version of this library to resolve them. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2d4dacb3", + "metadata": {}, + "outputs": [], + "source": [ + "import platform\n", + "import sys\n", + "\n", + "\n", + "%pip install -qU \"pip<24.1\"\n", + "if platform.system() == \"Windows\" and sys.version_info >= (3,11,0):\n", + " %pip install git+https://github.com/aleksandr-mokrov/fairseq.git\n", + "else:\n", + " %pip install \"fairseq==0.12.2\"" ] }, { @@ -52,10 +71,9 @@ }, "outputs": [], "source": [ - "%pip install -qU \"pip<24.1\" # to fix fairseq install problem\n", "%pip install -q \"openvino>=2023.2.0\"\n", "!git clone https://github.com/svc-develop-team/so-vits-svc -b 4.1-Stable\n", - "%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu tqdm librosa \"torch>=2.1.0\" \"torchaudio>=2.1.0\" faiss-cpu \"gradio>=4.19\" \"numpy>=1.23.5\" \"fairseq==0.12.2\" praat-parselmouth" + "%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu tqdm librosa \"torch>=2.1.0\" \"torchaudio>=2.1.0\" faiss-cpu \"gradio>=4.19\" \"numpy>=1.23.5\" praat-parselmouth" ] }, { From da98400657203dd64d11056c49bac5b18b7be93d Mon Sep 17 00:00:00 2001 From: Aleksandr Mokrov Date: Thu, 5 Sep 2024 22:41:51 +0200 Subject: [PATCH 2/4] fix misspelling --- notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb index b1462e02c95..da283285e6f 100644 --- a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb +++ b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb @@ -41,7 +41,7 @@ "source": [ "## Prerequisites\n", "[back to top ⬆️](#Table-of-contents:)\n", - "This model has some problems with intallation. So, we have to downgrade `pip` to version below `24.1` to avoid problems with `fairseq`. Also, `fairseq` has some problems on `Windows` on `python>=3.11` and we use a custom version of this library to resolve them. " + "This model has some problems with installation. So, we have to downgrade `pip` to version below `24.1` to avoid problems with `fairseq`. Also, `fairseq` has some problems on `Windows` on `python>=3.11` and we use a custom version of this library to resolve them. " ] }, { From 235350439cb9291014a87ad44d23b21fda25dd31 Mon Sep 17 00:00:00 2001 From: Aleksandr Mokrov Date: Thu, 5 Sep 2024 23:31:36 +0200 Subject: [PATCH 3/4] formatting --- notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb index da283285e6f..300ea27bf36 100644 --- a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb +++ b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb @@ -56,7 +56,7 @@ "\n", "\n", "%pip install -qU \"pip<24.1\"\n", - "if platform.system() == \"Windows\" and sys.version_info >= (3,11,0):\n", + "if platform.system() == \"Windows\" and sys.version_info >= (3, 11, 0):\n", " %pip install git+https://github.com/aleksandr-mokrov/fairseq.git\n", "else:\n", " %pip install \"fairseq==0.12.2\"" From 49ec2c396493f41015637c6e872452c1ebf51d41 Mon Sep 17 00:00:00 2001 From: Aleksandr Mokrov Date: Fri, 6 Sep 2024 11:17:31 +0200 Subject: [PATCH 4/4] Additional warning --- .../softvc-voice-conversion/softvc-voice-conversion.ipynb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb index 300ea27bf36..3540ac226db 100644 --- a/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb +++ b/notebooks/softvc-voice-conversion/softvc-voice-conversion.ipynb @@ -53,10 +53,14 @@ "source": [ "import platform\n", "import sys\n", + "import warnings\n", "\n", "\n", "%pip install -qU \"pip<24.1\"\n", "if platform.system() == \"Windows\" and sys.version_info >= (3, 11, 0):\n", + " warnings.warn(\n", + " \"Building the custmom fairseq package may take a long time and may require additional privileges in the system. We recommend using Python versions 3.8, 3.9 or 3.10 for this model.\"\n", + " )\n", " %pip install git+https://github.com/aleksandr-mokrov/fairseq.git\n", "else:\n", " %pip install \"fairseq==0.12.2\""