Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
conda create -n cosyvoice -y python=3.10
conda activate cosyvoice
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
```

# Optional: enable vLLM support in a separate environment
``` sh
conda create -n cosyvoice_vllm -y python=3.10
conda activate cosyvoice_vllm
pip install -r requirements.txt -r requirements/vllm.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
```

# If you encounter sox compatibility issues
# ubuntu
Expand Down Expand Up @@ -160,10 +168,10 @@ Notice that `vllm` has a lot of specific requirements. You can create a new env
``` sh
conda create -n cosyvoice_vllm --clone cosyvoice
conda activate cosyvoice_vllm
# for vllm==0.9.0
pip install vllm==v0.9.0 transformers==4.51.3 numpy==1.26.4 -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
# for vllm>=0.11.0
pip install vllm==v0.11.0 transformers==4.57.1 numpy==1.26.4 -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
# Install recommended vLLM support
pip install -r requirements/vllm.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
# Legacy vLLM support (optional):
# pip install vllm==0.9.0 transformers==4.51.3 numpy==1.26.4 -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
python vllm_example.py
```

Expand Down
47 changes: 7 additions & 40 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,9 @@
--extra-index-url https://download.pytorch.org/whl/cu121
--extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ # https://github.com/microsoft/onnxruntime/issues/21684
conformer==0.3.2
deepspeed==0.15.1; sys_platform == 'linux'
diffusers==0.29.0
fastapi==0.115.6
fastapi-cli==0.0.4
gdown==5.1.0
gradio==5.4.0
grpcio==1.57.0
grpcio-tools==1.57.0
hydra-core==1.3.2
HyperPyYAML==1.2.3
inflect==7.3.1
librosa==0.10.2
lightning==2.2.4
matplotlib==3.7.5
modelscope==1.20.0
networkx==3.1
numpy==1.26.4
omegaconf==2.3.0
onnx==1.16.0
onnxruntime-gpu==1.18.0; sys_platform == 'linux'
onnxruntime==1.18.0; sys_platform == 'darwin' or sys_platform == 'win32'
openai-whisper==20231117
protobuf==4.25
pyarrow==18.1.0
pydantic==2.7.0
pyworld==0.3.4
rich==13.7.1
soundfile==0.12.1
tensorboard==2.14.0
tensorrt-cu12==10.13.3.9; sys_platform == 'linux'
tensorrt-cu12-bindings==10.13.3.9; sys_platform == 'linux'
tensorrt-cu12-libs==10.13.3.9; sys_platform == 'linux'
torch==2.3.1
torchaudio==2.3.1
transformers==4.51.3
x-transformers==2.11.24
uvicorn==0.30.0
wetext==0.0.4
wget==3.2
-r requirements/base.txt
-r requirements/tts.txt
-r requirements/runtime.txt
-r requirements/serve.txt
-r requirements/train.txt
# Optional vLLM support (install separately):
# pip install -r requirements/vllm.txt
15 changes: 15 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
conformer==0.3.2
numpy==1.26.4
torch==2.3.1
torchaudio==2.3.1
transformers==4.51.3
x-transformers==2.11.24
hydra-core==1.3.2
HyperPyYAML==1.2.3
omegaconf==2.3.0
pydantic==2.7.0
rich==13.7.1
protobuf==4.25
networkx==3.1
wget==3.2
inflect==7.3.1
6 changes: 6 additions & 0 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
onnx==1.16.0
onnxruntime-gpu==1.18.0; sys_platform == 'linux'
onnxruntime==1.18.0; sys_platform == 'darwin' or sys_platform == 'win32'
tensorrt-cu12==10.13.3.9; sys_platform == 'linux'
tensorrt-cu12-bindings==10.13.3.9; sys_platform == 'linux'
tensorrt-cu12-libs==10.13.3.9; sys_platform == 'linux'
6 changes: 6 additions & 0 deletions requirements/serve.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
fastapi==0.115.6
fastapi-cli==0.0.4
gradio==5.4.0
grpcio==1.57.0
grpcio-tools==1.57.0
uvicorn==0.30.0
4 changes: 4 additions & 0 deletions requirements/train.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
deepspeed==0.15.1; sys_platform == 'linux'
lightning==2.2.4
tensorboard==2.14.0
matplotlib==3.7.5
9 changes: 9 additions & 0 deletions requirements/tts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
diffusers==0.29.0
gdown==5.1.0
librosa==0.10.2
soundfile==0.12.1
pyworld==0.3.4
pyarrow==18.1.0
modelscope==1.20.0
wetext==0.0.4
openai-whisper==20231117
4 changes: 4 additions & 0 deletions requirements/vllm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Optional vLLM support. Install in a separate environment if needed.
vllm==0.11.0
transformers==4.57.1
numpy==1.26.4