Skip to content

Commit

Permalink
Merge branch 'main' into fix/change-default-f0-method
Browse files Browse the repository at this point in the history
  • Loading branch information
34j authored Mar 25, 2023
2 parents 2eccf80 + 9b9cb6f commit 36bbd44
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 14 deletions.
10 changes: 10 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@
"doc",
"bug"
]
},
{
"login": "Lordmau5",
"name": "Lordmau5",
"avatar_url": "https://avatars.githubusercontent.com/u/1345036?v=4",
"profile": "https://github.com/Lordmau5",
"contributions": [
"bug",
"code"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore everything
*
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

<!--next-version-placeholder-->

## v1.3.2 (2023-03-24)
### Fix
* **gui:** Fix devices list and fix tqdm error in gui ([#99](https://github.com/34j/so-vits-svc-fork/issues/99)) ([`59724cd`](https://github.com/34j/so-vits-svc-fork/commit/59724cd2afc6a8d5ef6ea4b7fa8c012e21fc4af6))

### Documentation
* Add MashiroSA as a contributor for doc, and bug ([#98](https://github.com/34j/so-vits-svc-fork/issues/98)) ([`495b7cb`](https://github.com/34j/so-vits-svc-fork/commit/495b7cbfc9f9468d49bc3f57efe6c5c076dcb0d3))
* **notebook:** Fix cluster inference command and improve cluster training command ([#93](https://github.com/34j/so-vits-svc-fork/issues/93)) ([`7642594`](https://github.com/34j/so-vits-svc-fork/commit/7642594472bd660fe046c45909f0475398af199e))

## v1.3.1 (2023-03-24)
### Fix
* **gui:** Fix defaut for auto_play ([#97](https://github.com/34j/so-vits-svc-fork/issues/97)) ([`07920a4`](https://github.com/34j/so-vits-svc-fork/commit/07920a4954e1a14d47fcb2687f050d49d03da415))
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime
RUN ["apt", "update"]
RUN ["apt", "install", "-y", "build-essential"]
RUN ["pip", "install", "-U", "pip", "setuptools", "wheel"]
RUN ["pip", "install", "-U", "so-vits-svc-fork"]
ENTRYPOINT [ "svcg" ]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ A fork of [`so-vits-svc`](https://github.com/svc-develop-team/so-vits-svc) with

## Installation

### One click easy installation

<a href="https://github.com/34j/so-vits-svc-fork/releases/download/v1.3.2/install.bat" download>
<img src="https://img.shields.io/badge/.bat-download-blue?style=flat-square&logo=windows" alt="Download .bat">
</a>

### [Creating a Virtual Environment](https://github.com/34j/so-vits-svc-fork/wiki#creating-a-virtual-environment)

### Install
Expand Down Expand Up @@ -171,6 +177,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BlueAmulet"><img src="https://avatars.githubusercontent.com/u/43395286?v=4?s=80" width="80px;" alt="BlueAmulet"/><br /><sub><b>BlueAmulet</b></sub></a><br /><a href="#ideas-BlueAmulet" title="Ideas, Planning, & Feedback">🤔</a> <a href="#question-BlueAmulet" title="Answering Questions">💬</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ThrowawayAccount01"><img src="https://avatars.githubusercontent.com/u/125531852?v=4?s=80" width="80px;" alt="ThrowawayAccount01"/><br /><sub><b>ThrowawayAccount01</b></sub></a><br /><a href="https://github.com/34j/so-vits-svc-fork/issues?q=author%3AThrowawayAccount01" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mei.touhou.icu"><img src="https://avatars.githubusercontent.com/u/40637516?v=4?s=80" width="80px;" alt=""/><br /><sub><b></b></sub></a><br /><a href="https://github.com/34j/so-vits-svc-fork/commits?author=MashiroSA" title="Documentation">📖</a> <a href="https://github.com/34j/so-vits-svc-fork/issues?q=author%3AMashiroSA" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Lordmau5"><img src="https://avatars.githubusercontent.com/u/1345036?v=4?s=80" width="80px;" alt="Lordmau5"/><br /><sub><b>Lordmau5</b></sub></a><br /><a href="https://github.com/34j/so-vits-svc-fork/issues?q=author%3ALordmau5" title="Bug reports">🐛</a> <a href="https://github.com/34j/so-vits-svc-fork/commits?author=Lordmau5" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
62 changes: 62 additions & 0 deletions easy-installation/install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@echo off

echo Checking for Python 3.10...

py -3.10 --version >nul 2>&1
if %errorlevel%==0 (
echo Python 3.10 is already installed.
) else (
echo Python 3.10 is not installed. Downloading installer...
curl https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe -o python-3.10.10-amd64.exe

echo Installing Python 3.10...
python-3.10.10-amd64.exe /quiet InstallAllUsers=1 PrependPath=1

echo Cleaning up installer...
del python-3.10.10-amd64.exe
)

echo Checking GPU...
nvidia-smi >nul 2>&1
if %errorlevel%==0 (
set GPU=1
) else (
set GPU=0
)

if %GPU%==1 (
echo Checking CUDA...
nvcc --version
if %errorlevel%==0 (
echo CUDA is already installed.
) else (
echo Please install CUDA 11.7 from https://developer.nvidia.com/cuda-11-7-0-download-archive?target_os=Windows & exit /b 1
)

echo Checking cuDNN...
if exist "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\cudnn64_8.dll" (
echo cuDNN is already installed.
) else (
echo Please install cuDNN for CUDA 11.x from https://developer.nvidia.com/cudnn (https://developer.nvidia.com/downloads/compute/cudnn/secure/8.8.1/local_installers/11.8/cudnn-windows-x86_64-8.8.1.3_cuda11-archive.zip/) & exit /b 1
)
)

echo Creating virtual environment...
py -3.10 -m venv venv

echo Updating pip and wheel...
venv\Scripts\python.exe -m pip install --upgrade pip wheel

if %GPU%==1 (
echo Installing PyTorch with GPU support...
venv\Scripts\pip.exe install torch torchaudio --index-url https://download.pytorch.org/whl/cu117
) else (
echo Installing PyTorch without GPU support...
venv\Scripts\pip.exe install torch torchaudio
)

echo Installing so-vits-svc-fork...
venv\Scripts\pip.exe install so-vits-svc-fork

echo Launching so-vits-svc-fork GUI...
venv\Scripts\svcg.exe
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "so-vits-svc-fork"
version = "1.3.1"
version = "1.3.2"
description = "A fork of so-vits-svc."
authors = ["34j <34j.95a2p@simplelogin.com>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/so_vits_svc_fork/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.3.1"
__version__ = "1.3.2"
35 changes: 23 additions & 12 deletions src/so_vits_svc_fork/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,24 +459,35 @@ def clean_checkpoints(
sort_by_time -- True -> chronologically delete ckpts
False -> lexicographically delete ckpts
"""
LOG.warning("Cleaning old checkpoints...")
path_to_models = Path(path_to_models)
name_key = lambda p: int(re.match(r"._(\d+)", p.stem).group(1))

# Define sort key functions
name_key = lambda p: int(re.match(r"[GD]_(\d+)", p.stem).group(1))
time_key = lambda p: p.stat().st_mtime
models_sorted = sorted(
path_key = lambda p: (p.stem[0], time_key(p) if sort_by_time else name_key(p))

models = list(
filter(
lambda p: (p.is_file() and re.match(r"._\d+", p.stem)),
lambda p: (
p.is_file()
and re.match(r"[GD]_\d+", p.stem)
and not p.stem.endswith("_0")
),
path_to_models.glob("*.pth"),
),
key=time_key if sort_by_time else name_key,
)
)

models_sorted = sorted(models, key=path_key)

models_sorted_grouped = groupby(models_sorted, lambda p: p.stem[0])
for k, g in models_sorted_grouped:
to_dels = list(g)[:-n_ckpts_to_keep]
for to_del in to_dels:
if to_del.stem.endswith("_0"):
continue
LOG.warning(f"Removing {to_del}")
to_del.unlink()

for group_name, group_items in models_sorted_grouped:
to_delete_list = list(group_items)[:-n_ckpts_to_keep]

for to_delete in to_delete_list:
LOG.warning(f"Removing {to_delete}")
to_delete.unlink()


def summarize(
Expand Down

0 comments on commit 36bbd44

Please sign in to comment.