Parcourir la source

[chore] add docs for macos (#544)

* add docs for macos

* add warning and language
Ftps il y a 1 an
Parent
commit
82aa6e823e
4 fichiers modifiés avec 85 ajouts et 13 suppressions
  1. 24 6
      docs/en/index.md
  2. 21 3
      docs/ja/index.md
  3. 22 4
      docs/pt/index.md
  4. 18 0
      docs/zh/index.md

+ 24 - 6
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:

+ 21 - 3
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 のインストール:

+ 22 - 4
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:

+ 18 - 0
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: