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

1.0.6 PR #5

Merged
merged 24 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e33466a
Add large model to manifest.yml
jljl1337 Apr 5, 2024
063b2ec
Update .gitignore to exclude src/svc_toolkit/models/*/* directory
jljl1337 Apr 5, 2024
5bc6be3
Try install pytorch from poetry
jljl1337 Apr 9, 2024
944b00d
Commented out unnecessary dependencies in environment_dev.yml
jljl1337 Apr 9, 2024
9501206
Fix bug
jljl1337 Apr 9, 2024
4cabb4a
Create LICENSE
jljl1337 Apr 10, 2024
9b05cc6
Remove .coveragerc file
jljl1337 Apr 10, 2024
50940d7
Fix conversion_thread.wait() calls in test_conversion.py
jljl1337 Apr 10, 2024
6259068
Update error message in SeparationThread class
jljl1337 Apr 10, 2024
b829199
Update pyproject.toml
jljl1337 Apr 10, 2024
1acfd53
Update doc, vscode extension recommendations
jljl1337 Apr 10, 2024
c61817a
Update installation.md with new options for installing the package
jljl1337 Apr 10, 2024
6558139
Add link to usage documentation in installation.md
jljl1337 Apr 10, 2024
5f7a076
Update split_checkbox label and start_preprocess_button text in Train…
jljl1337 Apr 10, 2024
0338a8a
Update preprocess_group_box label in TrainingWidget class
jljl1337 Apr 10, 2024
14470d9
Update usage and installation
jljl1337 Apr 10, 2024
527a455
Fix typo in MixingWidget class
jljl1337 Apr 10, 2024
02e59f7
Update pyproject.toml with ipykernel dependency
jljl1337 Apr 10, 2024
4a76890
Update development.md with IDE and Poetry setup instructions
jljl1337 Apr 10, 2024
cdb7429
Update troubleshooting.md with instructions for reinstalling the pack…
jljl1337 Apr 10, 2024
f9646c3
Update troubleshooting.md with instructions for reinstalling the pack…
jljl1337 Apr 10, 2024
8053859
Update cli entry help description
jljl1337 Apr 10, 2024
c8a997e
Update CLI entry help descriptions
jljl1337 Apr 10, 2024
fb306ac
Remove conda environment files
jljl1337 Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ cython_debug/

# Any filename including tmp
*tmp*
model/
models/*/*
model_log/
input_csv/
output/
evaluation/
src/svc_toolkit/models/*/*
.DS_Store
10 changes: 10 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"recommendations": [
"PKief.material-icon-theme",
"mhutchie.git-graph",
"eamodio.gitlens",
"ms-python.python",
"be5invis.toml",
"ryanluker.vscode-coverage-gutters",
]
}
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
"label": "Remove Conda Environment",
"type": "shell",
"command": "conda deactivate && conda env remove --name svc",
"command": "conda env remove --name svc",
"group": {
"kind": "build",
"isDefault": false
Expand Down Expand Up @@ -82,7 +82,7 @@
{
"label": "Remove Conda Environment (Development)",
"type": "shell",
"command": "conda deactivate && conda env remove --name svc_dev",
"command": "conda env remove --name svc_dev",
"group": {
"kind": "build",
"isDefault": false
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 jljl1337

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
55 changes: 45 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,66 @@
![Deployment](https://github.com/jljl1337/svc-toolkit/actions/workflows/deployments.yml/badge.svg)
[![Codecov](https://codecov.io/gh/jljl1337/svc-toolkit/graph/badge.svg?token=QBM6OLIG00)](https://codecov.io/gh/jljl1337/svc-toolkit)

A self-contained singing voice conversion using the so-vits-svc architecture,
A self-contained singing voice conversion application using the so-vits-svc architecture,
with Deep U-Net model for vocal separation feature and easy to use GUI.

## Getting Started

### Installation

1. Install [pipx](https://github.com/pypa/pipx)
1. Install [Python](https://www.python.org/downloads/) (3.10 is recommended, but 3.10 - 3.12 should work)

2. Install the package
2. Install [pipx](https://pipx.pypa.io/stable/installation/)

```bash
pipx install svc-toolkit --python=3.10
3. Install the package by running this following terminal command if you only have one Python version installed:

```
pipx install svc-toolkit
```

To install with a specific Python version, use the `--python` flag. For example, to install with Python 3.10:

```
pipx install svc-toolkit --python 3.10
```

For other installation options, see [Installation](installation.md).
<details markdown>
<summary>Using NVIDIA GPU</summary>

To use the package with NVIDIA GPU, you need to upgrade the following dependencies:

```
pipx inject svc-toolkit torch==2.1.1 torchaudio==2.1.1 --pip-args="-U" --index-url https://download.pytorch.org/whl/cu121
```

For CUDA version 11.*, you can change the `cu121` to `cu118`. So the command will be:

```
pipx inject svc-toolkit torch==2.1.1 torchaudio==2.1.1 --pip-args="-U" --index-url https://download.pytorch.org/whl/cu118
```

</details>

Note that AMD GPUs are not actively supported, but you can try using the package with the CPU version of PyTorch.

For other installation options, see [Installation](https://jljl1337.github.io/svc-toolkit/installation/).

### Usage

```bash
svc-toolkit
#### Windows

```
svct.exe
```

#### macOS/Linux

```
svct
```

For more user guide, see [Usage](usage.md).
For the detailed usage guide, see [Usage](https://jljl1337.github.io/svc-toolkit/usage/).

## Development

For development guide, see [Development](development.md).
For the detailed development guide, see [Development](https://jljl1337.github.io/svc-toolkit/development/).
52 changes: 51 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
# Development
# Development

## IDE

[Visual Studio Code](https://code.visualstudio.com/) is recommended as the IDE
for developing the package. You can install the recommended extensions by opening
the workspace in the IDE. Useful commands are also provided as tasks in the
`.vscode/tasks.json` file.

Though, all IDEs that support Python development can be used, and those useful
commands can be copied from the `.vscode/tasks.json` file to the IDE of your choice.

## Poetry

[Poetry](https://python-poetry.org/) is used for managing the package dependencies,
virtual environment, building and publishing the package. It is recommended to install
Poetry globally on your system, instead of in the same virtual environment that installs
the package. The recommended version is `1.8.2`, though newer versions should work.

Using your own choice of virtual environment manager is also possible, but the
steps to install for GPU support might be different.

## Development Environment

To set up the development environment, follow these steps:

1. Clone the repository and checkout a non-main branch

2. Install Poetry

3. Install the package in editable mode

poetry install

4. Select the Python interpreter in the IDE to the virtual environment created by Poetry

5. Upgrade the dependencies if you want to develop with NVIDIA GPU

Activate the virtual environment created by Poetry if it is not activated:

poetry shell

Then, run the following command:

pip install -U torch==2.1.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121

For CUDA version 11.*, you can change the `cu121` to `cu118`. So the command will be:

pip install -U torch==2.1.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118

6. Good to go!
Binary file added docs/images/conversion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/conversion_advanced_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/mixing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/separation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/training.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 94 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,97 @@
# Installation

## Option 1
## Option 1: pipx

## Option 2
1. Install [Python](https://www.python.org/downloads/) (3.10 is recommended, but 3.10 - 3.12 should work)

2. Install [pipx](https://pipx.pypa.io/stable/installation/)

3. Install the package by running this following terminal command if you only have one Python version installed:

```
pipx install svc-toolkit
```

To install with a specific Python version, use the `--python` flag. For example, to install with Python 3.10:

```
pipx install svc-toolkit --python 3.10
```

<details markdown>
<summary>Using NVIDIA GPU</summary>

To use the package with NVIDIA GPU, you need to upgrade the following dependencies:

```
pipx inject svc-toolkit torch==2.1.1 torchaudio==2.1.1 --pip-args="-U" --index-url https://download.pytorch.org/whl/cu121
```

For CUDA version 11.*, you can change the `cu121` to `cu118`. So the command will be:

```
pipx inject svc-toolkit torch==2.1.1 torchaudio==2.1.1 --pip-args="-U" --index-url https://download.pytorch.org/whl/cu118
```

</details>

For usage, see [here](./usage.md)

## Option 2: Virtual Environment

Any virtual environment manager can be used to create a virtual environment for the package.
Here is an example using `miniconda`:

1. Install [miniconda](https://docs.anaconda.com/free/miniconda/miniconda-install/)

2. Create a new environment:

conda create -n svc-venv python=3.10

3. Activate the environment:

conda activate svc-venv

4. Install the package:

pip install svc-toolkit

Note that `svc-venv` is the environment name, you can change it to any name you like.

<details markdown>
<summary>Using NVIDIA GPU</summary>

To use the package with NVIDIA GPU, you need to upgrade the following dependencies:

```
pip install -U torch==2.1.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121
```

For CUDA version 11.*, you can change the `cu121` to `cu118`. So the command will be:

```
pip install -U torch==2.1.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
```

</details>

For usage, see [here](./usage.md)

## What is the difference between these two options? Which one should I choose?

For those who are familiar with Python, you may have used `virtualenv` or `venv`
to create isolated environments for your Python projects. This is adopted to avoid
the same dependency with different version conflicts between different projects.

[pipx](https://pipx.pypa.io/en/stable/) is just built on top of `venv`, what it
does is to create a virtual environment for each package you install, and install
the package in that virtual environment. It is usually used for installing packages
with entry point(s), like `svct` in this case.

One of the advantages of using `pipx` is that the entry point of the package is
available in your shell, so you can run the package directly from the terminal without
activating the virtual environment.

However, if you are already familiar with using virtual environment, and you want
to manage the environment yourself, you can use your preferred tools to create one
and install the package in that environment.
26 changes: 24 additions & 2 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
# Troubleshooting

## Reinstalling the package

If the package is not working as expected, try uninstalling and installing the package
again.

If the package is installed using pipx, uninstall the package using this command:

```
pipx uninstall svc-toolkit
```

If the package is installed using virtual environment, uninstall the package by
deactivating the virtual environment and delete it.

Then, install the package again. For installation instructions, see [here](./installation.md).

## GPU not detected

If the GPU is not detected, make sure that the latest version of the GPU driver
is installed and the correct version of PyTorch is installed. You may uninstall
the package and reinstall it with the correct version of PyTorch.

## Poetry install hangs

If `poetry install` hangs, try running the command with the `-vvv` flag to see what's happening.

```bash
```
poetry install -vvv
```

Expand All @@ -20,7 +42,7 @@ If it stop at something like this:

Then you may run this command:

```bash
```
poetry config keyring.enabled false
```

Expand Down
Loading
Loading