From 37b11c305ad4cb10b400ec9c5514854b7d32e17a Mon Sep 17 00:00:00 2001 From: Ftps Date: Fri, 13 Sep 2024 23:14:22 +0900 Subject: [PATCH 1/2] add docs for macos --- docs/en/index.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/en/index.md b/docs/en/index.md index fcdc77be..daa6c5e5 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -109,6 +109,18 @@ pip3 install -e .[stable] apt install libsox-dev ``` +## MacOS Setup + +```bash +# Create a python 3.10 virtual environment, you can also use virtualenv +conda create -n fish-speech python=3.10 +conda activate fish-speech +# Install pytorch +pip install torch torchvision torchaudio +# Install fish-speech +pip install -e .[stable] +``` + ## Changelog - 2024/09/10: Updated Fish-Speech to 1.4 version, with an increase in dataset size and a change in the quantizer's n_groups from 4 to 8. From 37a6036b2c050fef5ab61cca49f26e9a30022499 Mon Sep 17 00:00:00 2001 From: Ftps Date: Sun, 6 Oct 2024 19:15:18 +0900 Subject: [PATCH 2/2] add warning and language --- docs/en/index.md | 30 ++++++++++++++++++++++++------ docs/ja/index.md | 24 +++++++++++++++++++++--- docs/pt/index.md | 26 ++++++++++++++++++++++---- docs/zh/index.md | 18 ++++++++++++++++++ 4 files changed, 85 insertions(+), 13 deletions(-) diff --git a/docs/en/index.md b/docs/en/index.md index ab7f87d7..40e4e48e 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -65,23 +65,23 @@ Non-professional Windows users can consider the following basic methods to run t !!! info "Optional" - Want to start the inference WebUI? + Want to start the inference WebUI? - Edit the `API_FLAGS.txt` file in the project root directory and modify the first three lines as follows: + Edit the `API_FLAGS.txt` file in the project root directory and modify the first three lines as follows: ``` - --infer - # --api + --infer + # --api # --listen ... ... ``` !!! info "Optional" - Want to start the API server? + Want to start the API server? Edit the `API_FLAGS.txt` file in the project root directory and modify the first three lines as follows: - ``` + ``` # --infer --api --listen ... @@ -109,6 +109,24 @@ pip3 install -e .[stable] apt install libsox-dev ffmpeg ``` +## macos setup + +If you want to perform inference on MPS, please add the `--device mps` flag. +Please refer to [this PR](https://github.com/fishaudio/fish-speech/pull/461#issuecomment-2284277772) for a comparison of inference speeds. + +!!! warning + The `compile` option is not officially supported on Apple Silicon devices, so there is no guarantee that inference speed will improve. + +```bash +# create a python 3.10 virtual environment, you can also use virtualenv +conda create -n fish-speech python=3.10 +conda activate fish-speech +# install pytorch +pip install torch torchvision torchaudio +# install fish-speech +pip install -e .[stable] +``` + ## Docker Setup 1. Install NVIDIA Container Toolkit: diff --git a/docs/ja/index.md b/docs/ja/index.md index df10656e..6a2a365f 100644 --- a/docs/ja/index.md +++ b/docs/ja/index.md @@ -69,8 +69,8 @@ pip install https://github.com/AnyaCoder/fish-speech/releases/download/v0.1.0/tr 推論WebUIを起動しますか? プロジェクトのルートディレクトリにある `API_FLAGS.txt` ファイルを編集し、最初の3行を次のように変更します: ``` - --infer - # --api + --infer + # --api # --listen ... ... ``` @@ -78,7 +78,7 @@ pip install https://github.com/AnyaCoder/fish-speech/releases/download/v0.1.0/tr !!! info "オプション" APIサーバーを起動しますか? プロジェクトのルートディレクトリにある `API_FLAGS.txt` ファイルを編集し、最初の3行を次のように変更します: - ``` + ``` # --infer --api --listen ... @@ -107,6 +107,24 @@ pip3 install -e .[stable] apt install libsox-dev ffmpeg ``` +## macos setup + +推論をMPS上で行う場合は、`--device mps`フラグを追加してください。 +推論速度の比較は[こちらのPR](https://github.com/fishaudio/fish-speech/pull/461#issuecomment-2284277772)を参考にしてください。 + +!!! warning + AppleSiliconのデバイスでは、compileオプションに正式に対応していませんので、推論速度が向上する保証はありません。 + +```bash +# create a python 3.10 virtual environment, you can also use virtualenv +conda create -n fish-speech python=3.10 +conda activate fish-speech +# install pytorch +pip install torch torchvision torchaudio +# install fish-speech +pip install -e .[stable] +``` + ## Docker セットアップ 1. NVIDIA Container Toolkit のインストール: diff --git a/docs/pt/index.md b/docs/pt/index.md index 36b7d5e1..f3700a98 100644 --- a/docs/pt/index.md +++ b/docs/pt/index.md @@ -67,8 +67,8 @@ Usuários não profissionais do Windows podem considerar os seguintes métodos b Você quer iniciar o WebUI de inferência? Edite o arquivo `API_FLAGS.txt` no diretório raiz do projeto e modifique as três primeiras linhas como segue: ``` - --infer - # --api + --infer + # --api # --listen ... ... ``` @@ -76,8 +76,8 @@ Usuários não profissionais do Windows podem considerar os seguintes métodos b !!! info "Opcional" Você quer iniciar o servidor de API? Edite o arquivo `API_FLAGS.txt` no diretório raiz do projeto e modifique as três primeiras linhas como segue: - - ``` + + ``` # --infer --api --listen ... @@ -105,6 +105,24 @@ pip3 install -e .[stable] apt install libsox-dev ffmpeg ``` +## Configuração para macos + +Se você quiser realizar inferências no MPS, adicione a flag `--device mps`. +Para uma comparação das velocidades de inferência, consulte [este PR](https://github.com/fishaudio/fish-speech/pull/461#issuecomment-2284277772). + +!!! aviso + A opção `compile` não é oficialmente suportada em dispositivos Apple Silicon, então não há garantia de que a velocidade de inferência irá melhorar. + +```bash +# create a python 3.10 virtual environment, you can also use virtualenv +conda create -n fish-speech python=3.10 +conda activate fish-speech +# install pytorch +pip install torch torchvision torchaudio +# install fish-speech +pip install -e .[stable] +``` + ## Configuração do Docker 1. Instale o NVIDIA Container Toolkit: diff --git a/docs/zh/index.md b/docs/zh/index.md index 1ed8163b..4a878cd0 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -104,6 +104,24 @@ pip3 install -e .[stable] apt install libsox-dev ffmpeg ``` +## macos 配置 + +如果您想在 MPS 上进行推理,请添加 `--device mps` 标志。 +有关推理速度的比较,请参考 [此 PR](https://github.com/fishaudio/fish-speech/pull/461#issuecomment-2284277772)。 + +!!! 警告 + `compile` 选项在 Apple Silicon 设备上尚未正式支持,因此推理速度没有提升的保证。 + +```bash +# create a python 3.10 virtual environment, you can also use virtualenv +conda create -n fish-speech python=3.10 +conda activate fish-speech +# install pytorch +pip install torch torchvision torchaudio +# install fish-speech +pip install -e .[stable] +``` + ## Docker 配置 1. 安装 NVIDIA Container Toolkit: