diff --git a/README.md b/README.md index e9c7d492..ff721a95 100644 --- a/README.md +++ b/README.md @@ -63,9 +63,11 @@ pip install -U torch torchaudio --index-url https://download.pytorch.org/whl/cu1 pip install -U so-vits-svc-fork ``` -- If you are using an AMD GPU on Linux, replace `--index-url https://download.pytorch.org/whl/cu117` with `--index-url https://download.pytorch.org/whl/rocm5.4.2`. - If no GPU is available, simply remove `pip install -U torch torchaudio --index-url https://download.pytorch.org/whl/cu117`. -- If `fairseq` raises an error that [`Microsoft C++ Build Tools`](https://visualstudio.microsoft.com/visual-cpp-build-tools/) is not installed or that some dll is missing, please (re)install it. +- If you are using an AMD GPU on Linux, replace `--index-url https://download.pytorch.org/whl/cu117` with `--index-url https://download.pytorch.org/whl/rocm5.4.2`. AMD GPUs are not supported on Windows (#120). +- If `fairseq` raises an error: + - If it prompts [`Microsoft C++ Build Tools`](https://visualstudio.microsoft.com/visual-cpp-build-tools/) is not installed. please install it. + - If it prompts that some dll is missing, reinstalling `Microsoft Visual C++ 2022` and `Windows SDK` may help. ### Update @@ -132,14 +134,14 @@ Place your dataset like `dataset_raw/{speaker_id}/**/{wav_file}.{any_format}` (s svc pre-resample svc pre-config svc pre-hubert -svc train +svc train -t ``` #### Notes - Dataset audio duration per file should be <~ 10s or VRAM will run out. - To change the f0 inference method to CREPE, replace `svc pre-hubert` with `svc pre-hubert -fm crepe`. You may need to reduce `--n-jobs` due to performance issues. -- It is recommended to change the batch_size in `config.json` before the `train` command to match the VRAM capacity. As tested, the default requires about 14 GB. +- It is recommended to change the batch_size in `config.json` before the `train` command to match the VRAM capacity. The default value is optimized for Tesla T4 (16GB VRAM), but training is possible without that much VRAM. - Silence removal and volume normalization are automatically performed (as in the upstream repo) and are not required. ### Further help diff --git a/src/so_vits_svc_fork/__main__.py b/src/so_vits_svc_fork/__main__.py index 7f41ef44..e0335996 100644 --- a/src/so_vits_svc_fork/__main__.py +++ b/src/so_vits_svc_fork/__main__.py @@ -86,13 +86,32 @@ def cli(): help="path to output dir", default=Path("./logs/44k"), ) -def train(config_path: Path, model_path: Path): +@click.option( + "-t/-nt", + "--tensorboard/--no-tensorboard", + default=False, + type=bool, + help="launch tensorboard", +) +def train(config_path: Path, model_path: Path, tensorboard: bool = False): """Train model If D_0.pth or G_0.pth not found, automatically download from hub.""" from .train import train config_path = Path(config_path) model_path = Path(model_path) + + if tensorboard: + import webbrowser + + from tensorboard import program + + getLogger("tensorboard").setLevel(30) + tb = program.TensorBoard() + tb.configure(argv=[None, "--logdir", model_path.as_posix()]) + url = tb.launch() + webbrowser.open(url) + train(config_path=config_path, model_path=model_path)