From 36aa28e71a95f445a26f61d2822d59131d2c45ff Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Thu, 11 Jul 2024 21:03:05 +0300 Subject: [PATCH 1/8] loosen pytorch to 2.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fdc1164..be1884c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ github = "https://github.com/RVC-Project/Retrieval-based-Voice-Conversion" [tool.poetry.dependencies] python = "^3.10" -torch = "^2.1.0" +torch = "^2.0.0" fairseq = "^0.12.2" # fairseq = {git = "https://github.com/Tps-F/fairseq.git", branch="main"} soundfile = "^0.12.1" From 26920d6611f52ec16a9ab472873419fa164654d7 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Fri, 12 Jul 2024 22:37:47 +0300 Subject: [PATCH 2/8] allow newer numba versions --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index be1884c..86c2a2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ poethepoet = "^0.24.4" uvicorn = "^0.26.0" fastapi = "^0.109.0" python-multipart = "^0.0.6" -numba = "0.59.0rc1" +numba = "^0.59.0rc1" [tool.poetry.extras] api = ["uvicorn", "fastapi"] From c57c61500726b7e5adbc010c1bf5e7434ce8a057 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Sat, 13 Jul 2024 01:29:40 +0300 Subject: [PATCH 3/8] loosen python-multipart --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86c2a2e..b9e60b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ tensorboardx = "^2.6.2.2" poethepoet = "^0.24.4" uvicorn = "^0.26.0" fastapi = "^0.109.0" -python-multipart = "^0.0.6" +python-multipart = ">=0.0.6" numba = "^0.59.0rc1" [tool.poetry.extras] From e2aacd0c44bb1ec3280102c80a7fa8c984d3f8c0 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Sat, 13 Jul 2024 01:31:26 +0300 Subject: [PATCH 4/8] loosen numba --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b9e60b0..4c3ea67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ poethepoet = "^0.24.4" uvicorn = "^0.26.0" fastapi = "^0.109.0" python-multipart = ">=0.0.6" -numba = "^0.59.0rc1" +numba = ">=0.59.0" [tool.poetry.extras] api = ["uvicorn", "fastapi"] From 29e0640241da82525cd1c6e28781f284f9d9a8a9 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Sat, 13 Jul 2024 02:33:38 +0300 Subject: [PATCH 5/8] add fcpe to vc pipeline --- pyproject.toml | 2 +- rvc/modules/vc/pipeline.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4c3ea67..1a73a32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rvc" -version = "0.3.5" +version = "0.3.6" description = "An easy-to-use Voice Conversion framework based on VITS." authors = ["Ftps "] readme = "README.md" diff --git a/rvc/modules/vc/pipeline.py b/rvc/modules/vc/pipeline.py index f859b6f..e815a67 100644 --- a/rvc/modules/vc/pipeline.py +++ b/rvc/modules/vc/pipeline.py @@ -153,6 +153,18 @@ def get_f0( del self.model_rmvpe.model del self.model_rmvpe logger.info("Cleaning ortruntime memory") + elif f0_method == "fcpe": + if not hasattr(self, "model_fcpe"): + from torchfcpe import spawn_bundled_infer_model + + logger.info("Loading fcpe model") + self.model_fcpe = spawn_bundled_infer_model(self.device) + f0 = self.model_fcpe.infer( + torch.from_numpy(x).to(self.device).unsqueeze(0).float(), + sr=16000, + decoder_mode="local_argmax", + threshold=0.006, + ).squeeze().cpu().numpy() f0 *= pow(2, f0_up_key / 12) # with open("test.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()])) From d3acfd56b3beb6e5145a3c83bdbe9c2ab8030480 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Sat, 13 Jul 2024 02:36:16 +0300 Subject: [PATCH 6/8] undo loosen pytorch --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a73a32..d52a66f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ github = "https://github.com/RVC-Project/Retrieval-based-Voice-Conversion" [tool.poetry.dependencies] python = "^3.10" -torch = "^2.0.0" +torch = "^2.1.0" fairseq = "^0.12.2" # fairseq = {git = "https://github.com/Tps-F/fairseq.git", branch="main"} soundfile = "^0.12.1" From 778d2ad751bce3a9e2906a9e0fb471e261947214 Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Mon, 18 Nov 2024 21:20:46 +0000 Subject: [PATCH 7/8] add wheel build --- .github/workflows/build_wheel.yml | 65 +++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/build_wheel.yml diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml new file mode 100644 index 0000000..8c44218 --- /dev/null +++ b/.github/workflows/build_wheel.yml @@ -0,0 +1,65 @@ +name: Build wheel + +on: + workflow_dispatch: + create: + tags: + - v* + +jobs: + build: + permissions: write-all + strategy: + max-parallel: 4 + matrix: + platform: [ubuntu-latest] + python-version: ["3.10"] + + runs-on: ${{ matrix.platform }} + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Deps + run: python -m pip install . torch==2.3.1 wheel ninja build + - name: Build the wheel + run: python -m build --wheel --outdir dist/ + - run: du -h dist/* + - uses: actions/upload-artifact@v4 + with: + path: dist/*.whl + + - name: Log Built Wheels + run: | + ls dist + + - name: Set wheel name + run: echo "wheel_name=$(basename dist/*.whl)" >> $GITHUB_ENV + + - name: Get the tag version + id: extract_branch + run: echo ::set-output name=branch::${GITHUB_REF#refs/tags/} + + - name: Get Release with tag + id: get_current_release + uses: joutvhu/get-release@v1 + with: + tag_name: ${{ steps.extract_branch.outputs.branch }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Release Asset + id: upload_release_asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.get_current_release.outputs.upload_url }} + asset_path: ./dist/${{env.wheel_name}} + asset_name: ${{env.wheel_name}} + asset_content_type: application/* \ No newline at end of file From 2d7dee41847a8e557f689818adcb85ba783610dc Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Mon, 18 Nov 2024 21:25:10 +0000 Subject: [PATCH 8/8] fix dependencies and use pip 23.3.2 --- .github/workflows/build_wheel.yml | 4 +++- pyproject.toml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 8c44218..bd1ebf4 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -25,8 +25,10 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Install old pip + run: python -m pip install --upgrade pip==23.3.2 - name: Install Deps - run: python -m pip install . torch==2.3.1 wheel ninja build + run: python -m pip install . torch==2.3.1 wheel ninja build - name: Build the wheel run: python -m build --wheel --outdir dist/ - run: du -h dist/* diff --git a/pyproject.toml b/pyproject.toml index d52a66f..a41117b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,8 @@ github = "https://github.com/RVC-Project/Retrieval-based-Voice-Conversion" [tool.poetry.dependencies] python = "^3.10" -torch = "^2.1.0" -fairseq = "^0.12.2" +torch = ">=2.1.0" +fairseq = ">=0.12.2" # fairseq = {git = "https://github.com/Tps-F/fairseq.git", branch="main"} soundfile = "^0.12.1" librosa = "^0.10.1"