6drf21e / ChatTTS_colab

🚀 一键部署(含离线整合包)!基于 ChatTTS ,支持流式输出、音色抽卡、长音频生成和分角色朗读。简单易用,无需复杂安装。
2.12k stars 266 forks source link

API无法使用GPU #58

Closed shadowzz624 closed 5 months ago

shadowzz624 commented 5 months ago

WEBUI正常使用GPU,API不行,GPU驱动和相关环境已安装。 Using GPU: NVIDIA A100 80GB PCIe INFO:ChatTTS.core:Load from local: models ### WARNING:ChatTTS.utils.gpu_utils:GPU 0 has 81037.75 MB memory left. Switching to CPU. INFO:ChatTTS.core:use cpu INFO:ChatTTS.core:vocos loaded. INFO:ChatTTS.core:dvae loaded. INFO:ChatTTS.core:gpt loaded. INFO:ChatTTS.core:decoder loaded. INFO:ChatTTS.core:tokenizer loaded. INFO:ChatTTS.core:All initialized. INFO: Started server process [1146414] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:9880 (Press CTRL+C to quit) ^CINFO: Shutting down INFO: Waiting for application shutdown. INFO: Application shutdown complete. INFO: Finished server process [1146414] 被强制使用CPU。以下是环境日志 (venv) root@h3c-H3C-UniServer-R4900-G5:/usr/test/ChatTTS# nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2021 NVIDIA Corporation Built on Thu_Nov_18_09:45:30_PST_2021 Cuda compilation tools, release 11.5, V11.5.119 Build cuda_11.5.r11.5/compiler.30672275_0 (venv) root@h3c-H3C-UniServer-R4900-G5:/usr/test/ChatTTS# python Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import torch print(torch.cuda.is_available()) True print(torch.cuda.current_device()) 0 print(torch.cuda.get_device_name(torch.cuda.current_device())) NVIDIA A100 80GB PCIe

shadowzz624 commented 5 months ago

同样的机器,0.5版本正常,今天更新到0.6出现这个问题

6drf21e commented 5 months ago

fix: 99568b826b5f36134e61d6e153cca2ce121d3802