Kokoro-FastAPI icon indicating copy to clipboard operation
Kokoro-FastAPI copied to clipboard

start-gpu_mac.sh not running on mac gpu

Open fastfading opened this issue 8 months ago • 1 comments

Describe the bug start-gpu_mac.sh not running on mac gpu

Screenshots or console output INFO: Started server process [70722] INFO: Waiting for application startup. 08:30:58 AM | INFO | main:57 | Loading TTS model and voice packs... 08:30:58 AM | INFO | model_manager:38 | Initializing Kokoro V1 on cuda 08:30:58 AM | DEBUG | paths:101 | Searching for model in path: /Users/xxxxx/git/python/Kokoro-FastAPI/api/src/models 08:30:58 AM | INFO | kokoro_v1:45 | Loading Kokoro model on mps 08:30:58 AM | INFO | kokoro_v1:46 | Config path: /Users/xxxxx/git/python/Kokoro-FastAPI/api/src/models/v1_0/config.json 08:30:58 AM | INFO | kokoro_v1:47 | Model path: /Users/xxxxx/git/python/Kokoro-FastAPI/api/src/models/v1_0/kokoro-v1_0.pth /Users/xxxxx/miniconda3/envs/myenv/lib/python3.12/site-packages/torch/nn/modules/rnn.py:123: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.2 and num_layers=1 warnings.warn( /Users/xxxxx/miniconda3/envs/myenv/lib/python3.12/site-packages/torch/nn/utils/weight_norm.py:143: FutureWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm. WeightNorm.apply(module, name, dim) 08:30:59 AM | INFO | kokoro_v1:53 | Moving model to MPS device with CPU fallback for unsupported operations 08:30:59 AM | DEBUG | paths:153 | Scanning for voices in path: /Users/xxxxx/git/python/Kokoro-FastAPI/api/src/voices/v1_0 08:30:59 AM | DEBUG | paths:131 | Searching for voice in path: /Users/xxxxx/git/python/Kokoro-FastAPI/api/src/voices/v1_0 08:30:59 AM | DEBUG | model_manager:77 | Using default voice 'af_heart' for warmup 08:30:59 AM | INFO | kokoro_v1:78 | Creating new pipeline for language code: a 08:31:00 AM | DEBUG | kokoro_v1:250 | Generating audio for text with lang_code 'a': 'Warmup text for initialization.' /Users/xxxxx/miniconda3/envs/myenv/lib/python3.12/site-packages/kokoro/istftnet.py:92: UserWarning: The operator 'aten::angle' is not currently supported on the MPS backend and will fall back to run on the CPU. This may have performance implications. (Triggered internally at /Users/runner/work/pytorch/pytorch/pytorch/aten/src/ATen/mps/MPSFallback.mm:14.) return torch.abs(forward_transform), torch.angle(forward_transform) 08:31:01 AM | DEBUG | kokoro_v1:257 | Got audio chunk with shape: torch.Size([57600]) 08:31:01 AM | INFO | model_manager:84 | Warmup completed in 2977ms 08:31:01 AM | INFO | main:106 |

Branch / Deployment used latest git master 2025/4/5

Operating System Mac mini. m4 chips. 16GB

Additional context

fastfading avatar Apr 05 '25 00:04 fastfading

operator 'aten::angle' is not currently supported on the MPS backend and will fall back to run on the CPU

​MPS 后端限制:MPS 是 Apple 为 macOS 设备提供的 GPU 加速后端,但并非所有 PyTorch 操作符都支持 MPS。aten::angle 是用于计算复数张量角度的操作符,目前尚未在 MPS 中实现。

fastfading avatar Apr 05 '25 01:04 fastfading