超过6个字的时候会报错,设备是macbook pro m2 NotImplementedError: Output channels > 65536 not supported at the MPS device
[index-tts]超过6个字的时候会报错
回答
我的设备是 MacBook Pro Apple M3,是可以正常运行。
pip list 或者uv pip list 看看你的环境
这是我的:
Package Version
---------------------- -----------
accelerate 0.25.0
aiofiles 24.1.0
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.9.0
audioread 3.0.1
certifi 2025.1.31
cffi 1.17.1
charset-normalizer 3.4.1
click 8.1.8
contourpy 1.3.1
cycler 0.12.1
decorator 5.2.1
einops 0.8.1
fastapi 0.115.12
ffmpy 0.5.0
filelock 3.18.0
fonttools 4.57.0
fsspec 2025.3.2
gradio 5.24.0
gradio-client 1.8.0
groovy 0.1.2
h11 0.14.0
httpcore 1.0.7
httpx 0.28.1
huggingface-hub 0.30.2
idna 3.10
jinja2 3.1.6
joblib 1.4.2
kaldifst 1.7.13
kiwisolver 1.4.8
lazy-loader 0.4
librosa 0.11.0
llvmlite 0.44.0
markdown-it-py 3.0.0
markupsafe 3.0.2
matplotlib 3.8.2
mdurl 0.1.2
modelscope 1.25.0
mpmath 1.3.0
msgpack 1.1.0
networkx 3.4.2
numba 0.61.2
numpy 1.26.4
objprint 0.3.0
omegaconf 2.3.0
orjson 3.10.16
packaging 24.2
pandas 2.2.3
pillow 11.1.0
platformdirs 4.3.7
playsound 1.2.2
pooch 1.8.2
protobuf 6.30.2
psutil 7.0.0
pycparser 2.22
pydantic 2.11.3
pydantic-core 2.33.1
pydub 0.25.1
pygments 2.19.1
pyparsing 3.2.3
python-dateutil 2.9.0.post0
python-multipart 0.0.20
pytz 2025.2
pyyaml 6.0.2
regex 2024.11.6
requests 2.32.3
rich 14.0.0
ruff 0.11.5
safehttpx 0.1.6
safetensors 0.5.3
scikit-learn 1.6.1
scipy 1.15.2
semantic-version 2.10.0
sentencepiece 0.2.0
shellingham 1.5.4
simpleaudio 1.0.4
six 1.17.0
sniffio 1.3.1
soundfile 0.13.1
soxr 0.5.0.post1
starlette 0.46.1
sympy 1.13.1
threadpoolctl 3.6.0
tokenizers 0.15.0
tomlkit 0.13.2
torch 2.6.0
torchaudio 2.6.0
tqdm 4.67.1
transformers 4.36.2
typer 0.15.2
typing-extensions 4.13.2
typing-inspection 0.4.0
tzdata 2025.2
urllib3 2.4.0
uvicorn 0.34.0
viztracer 1.0.3
websockets 15.0.1
wetext 0.0.4
升级mac 系统到 15.1 以上再试试,torch 使用2.6.0 或更高nightly版本
Ref: https://github.com/pytorch/pytorch/blob/10a54ffe5ab6bd77c85410422a5b60a5cbca0ffd/aten/src/ATen/native/mps/operations/Convolution.mm#L169
On macOS < 15.1, MPS convolution kernel does not support output channels > 2^16
https://github.com/pytorch/pytorch/issues/140722
测试代码:
import torch.nn as nn
import torch
conv = nn.Conv1d(1, 65537, 3, padding=1).to('mps')
x = torch.ones([1, 1, 3])
我的设备是 MacBook Pro Apple M3,是可以正常运行。
pip list 或者uv pip list 看看你的环境
这是我的:
Package Version
---------------------- -----------
accelerate 0.25.0
aiofiles 24.1.0
annotated-types 0.7.0
antlr4-python3-runtime 4.9.3
anyio 4.9.0
audioread 3.0.1
certifi 2025.1.31
cffi 1.17.1
charset-normalizer 3.4.1
click 8.1.8
contourpy 1.3.1
cycler 0.12.1
decorator 5.2.1
einops 0.8.1
fastapi 0.115.12
ffmpy 0.5.0
filelock 3.18.0
fonttools 4.57.0
fsspec 2025.3.2
gradio 5.24.0
gradio-client 1.8.0
groovy 0.1.2
h11 0.14.0
httpcore 1.0.7
httpx 0.28.1
huggingface-hub 0.30.2
idna 3.10
jinja2 3.1.6
joblib 1.4.2
kaldifst 1.7.13
kiwisolver 1.4.8
lazy-loader 0.4
librosa 0.11.0
llvmlite 0.44.0
markdown-it-py 3.0.0
markupsafe 3.0.2
matplotlib 3.8.2
mdurl 0.1.2
modelscope 1.25.0
mpmath 1.3.0
msgpack 1.1.0
networkx 3.4.2
numba 0.61.2
numpy 1.26.4
objprint 0.3.0
omegaconf 2.3.0
orjson 3.10.16
packaging 24.2
pandas 2.2.3
pillow 11.1.0
platformdirs 4.3.7
playsound 1.2.2
pooch 1.8.2
protobuf 6.30.2
psutil 7.0.0
pycparser 2.22
pydantic 2.11.3
pydantic-core 2.33.1
pydub 0.25.1
pygments 2.19.1
pyparsing 3.2.3
python-dateutil 2.9.0.post0
python-multipart 0.0.20
pytz 2025.2
pyyaml 6.0.2
regex 2024.11.6
requests 2.32.3
rich 14.0.0
ruff 0.11.5
safehttpx 0.1.6
safetensors 0.5.3
scikit-learn 1.6.1
scipy 1.15.2
semantic-version 2.10.0
sentencepiece 0.2.0
shellingham 1.5.4
simpleaudio 1.0.4
six 1.17.0
sniffio 1.3.1
soundfile 0.13.1
soxr 0.5.0.post1
starlette 0.46.1
sympy 1.13.1
threadpoolctl 3.6.0
tokenizers 0.15.0
tomlkit 0.13.2
torch 2.6.0
torchaudio 2.6.0
tqdm 4.67.1
transformers 4.36.2
typer 0.15.2
typing-extensions 4.13.2
typing-inspection 0.4.0
tzdata 2025.2
urllib3 2.4.0
uvicorn 0.34.0
viztracer 1.0.3
websockets 15.0.1
wetext 0.0.4
accelerate 1.6.0 aiobotocore 2.5.0 aiofiles 22.1.0 aiohttp 3.8.3 aioitertools 0.7.1 aiolimiter 1.2.1 aiosignal 1.2.0 aiosqlite 0.18.0 alabaster 0.7.12 aliyun-python-sdk-core 2.15.1 altair 5.3.0 anaconda-catalogs 0.2.0 anaconda-client 1.12.0 anaconda-navigator 2.4.2 anaconda-project 0.11.1 annotated-types 0.7.0 antlr4-python3-runtime 4.9.3 anyio 3.5.0 appdirs 1.4.4 applaunchservices 0.3.0 appnope 0.1.2 appscript 1.1.2 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 astroid 2.14.2 astropy 5.1 asttokens 2.0.5 async-timeout 4.0.2 atomicwrites 1.4.0 attrs 25.3.0 audioread 3.0.1 Automat 20.2.0 autopep8 1.6.0 av 12.3.0 azure-cognitiveservices-speech 1.36.0 Babel 2.11.0 backcall 0.2.0 backports.functools-lru-cache 1.6.4 backports.tempfile 1.0 backports.weakref 1.0.post1 bce-python-sdk 0.9.29 bcrypt 3.2.0 beautifulsoup4 4.12.2 binaryornot 0.4.4 black 0.0 bleach 4.1.0 blinker 1.9.0 bokeh 3.2.1 boltons 23.0.0 botocore 1.29.76 Bottleneck 1.3.5 brotlipy 0.7.0 cachetools 5.5.2 certifi 2023.7.22 cffi 1.15.1 chardet 4.0.0 charset-normalizer 2.0.4 click 8.0.4 cloudpickle 2.2.1 clyent 1.2.2 colorama 0.4.6 colorcet 3.0.1 coloredlogs 15.0.1 comm 0.1.2 conda 23.7.2 conda-build 3.26.0 conda-content-trust 0+unknown conda_index 0.2.3 conda-libmamba-solver 23.5.0 conda-pack 0.6.0 conda-package-handling 2.2.0 conda_package_streaming 0.9.0 conda-repo-cli 1.0.41 conda-token 0.4.0 conda-verify 3.4.2 constantly 15.1.0 contourpy 1.0.5 cookiecutter 1.7.3 cryptography 41.0.2 cssselect 1.1.0 ctranslate2 4.5.0 cycler 0.11.0 cytoolz 0.12.0 dashscope 1.22.2 dask 2023.6.0 dataclasses-json 0.6.7 datasets 2.12.0 datashader 0.15.1 datashape 0.5.4 debugpy 1.6.7 decorator 5.1.1 defusedxml 0.7.1 diff-match-patch 20200713 dill 0.3.6 diskcache 5.6.3 distributed 2023.6.0 distro 1.9.0 dnspython 2.6.1 docstring-to-markdown 0.11 docutils 0.18.1 einops 0.8.1 einx 0.2.2 email_validator 2.1.1 encodec 0.1.1 entrypoints 0.4 et-xmlfile 1.1.0 executing 0.8.3 fastapi 0.111.0 fastapi-cli 0.0.4 faster-whisper 1.0.3 fastjsonschema 2.16.2 ffmpy 0.3.2 filelock 3.9.0 flake8 6.0.0 Flask 2.2.2 flatbuffers 25.2.10 fonttools 4.25.0 frozendict 2.4.4 frozenlist 1.3.3 fsspec 2024.5.0 future 0.18.3 gensim 4.3.0 gitdb 4.0.12 GitPython 3.1.44 glob2 0.7 gmpy2 2.1.2 gradio 4.33.0 gradio_client 0.17.0 greenlet 2.0.1 h11 0.14.0 h5py 3.7.0 HeapDict 1.0.1 holoviews 1.17.0 httpcore 1.0.5 httptools 0.6.1 httpx 0.27.0 huggingface-hub 0.23.2 humanfriendly 10.0 hvplot 0.8.4 hyperlink 21.0.0 idna 3.4 imagecodecs 2021.8.26 imageio 2.31.1 imagesize 1.4.1 imbalanced-learn 0.10.1 importlib-metadata 6.0.0 importlib_resources 6.4.0 incremental 21.3.0 indextts 0.1.0 /Users/guohui/my/install/index-tts inflection 0.5.1 iniconfig 1.1.1 intake 0.6.8 intervaltree 3.1.0 ipykernel 6.19.2 ipython 8.12.0 ipython-genutils 0.2.0 ipywidgets 8.0.4 isort 5.9.3 itemadapter 0.3.0 itemloaders 1.0.4 itsdangerous 2.0.1 jaraco.classes 3.2.1 jedi 0.18.1 jellyfish 0.9.0 Jinja2 3.1.2 jinja2-time 0.2.0 jmespath 0.10.0 joblib 1.2.0 json5 0.9.6 jsonpatch 1.33 jsonpointer 2.1 jsonschema 4.17.3 jupyter 1.0.0 jupyter_client 7.4.9 jupyter-console 6.6.3 jupyter_core 5.3.0 jupyter-events 0.6.3 jupyter-server 1.23.4 jupyter_server_fileid 0.9.0 jupyter_server_ydoc 0.8.0 jupyter-ydoc 0.2.4 jupyterlab 3.6.3 jupyterlab-pygments 0.1.2 jupyterlab_server 2.22.0 jupyterlab-widgets 3.0.5 kaldifst 1.7.13 keyring 23.13.1 kiwisolver 1.4.4 langchain 0.1.20 langchain-community 0.0.38 langchain-core 0.1.53 langchain-openai 0.1.1 langchain-text-splitters 0.0.2 langsmith 0.1.147 lazy_loader 0.2 lazy-object-proxy 1.6.0 libarchive-c 2.9 libmambapy 1.4.1 librosa 0.11.0 linkify-it-py 2.0.0 llvmlite 0.40.0 lmdb 1.4.1 locket 1.0.0 lxml 4.9.2 lz4 4.3.2 Markdown 3.4.1 markdown-it-py 2.2.0 MarkupSafe 2.1.1 marshmallow 3.26.1 matplotlib 3.8.2 matplotlib-inline 0.1.6 mccabe 0.7.0 mdit-py-plugins 0.3.0 mdurl 0.1.0 mistune 0.8.4 modelscope 1.25.0 more-itertools 8.12.0 mpmath 1.3.0 msgpack 1.0.3 multidict 6.0.2 multipledispatch 0.6.0 multiprocess 0.70.14 munkres 1.1.4 mypy-extensions 0.4.3 navigator-updater 0.4.0 nbclassic 0.5.5 nbclient 0.5.13 nbconvert 6.5.4 nbformat 5.7.0 nest-asyncio 1.5.6 networkx 3.1 nltk 3.8.1 notebook 6.5.4 notebook_shim 0.2.2 numba 0.57.0 numexpr 2.8.4 numpy 1.24.4 numpydoc 1.5.0 office 0.0.1a0 omegaconf 2.3.0 onnxruntime 1.21.0 openai 1.16.2 openai-whisper 20240930 opencv-python 4.11.0.86 openpyxl 3.0.10 orjson 3.10.3 outcome 1.3.0.post0 packaging 23.2 pandas 1.5.3 pandocfilters 1.5.0 panel 1.2.1 param 1.13.0 parsel 1.6.0 parso 0.8.3 partd 1.2.0 pathlib 1.0.1 pathspec 0.10.3 patsy 0.5.3 pep8 1.7.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.4.0 pip 23.2.1 pkginfo 1.9.6 platformdirs 2.5.2 plotly 5.9.0 pluggy 1.0.0 ply 3.11 pooch 1.4.0 poyo 0.5.0 prometheus-client 0.14.1 prompt_toolkit 3.0.50 Protego 0.1.16 protobuf 4.25.6 psutil 5.9.0 ptyprocess 0.7.0 pure-eval 0.2.2 py-cpuinfo 8.0.0 pyarrow 11.0.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 PyAudio 0.2.14 pybase16384 0.3.8 pycodestyle 2.10.0 pycosat 0.6.4 pycparser 2.21 pycryptodome 3.22.0 pyct 0.5.0 pycurl 7.45.2 pydantic 2.7.3 pydantic_core 2.18.4 pydeck 0.9.1 PyDispatcher 2.0.5 pydocstyle 6.3.0 pydub 0.25.1 pyerfa 2.0.0 pyflakes 3.0.1 Pygments 2.15.1 PyJWT 2.4.0 pylint 2.16.2 pylint-venv 2.3.0 pyls-spyder 0.4.0 pyobjc-core 9.0 pyobjc-framework-Cocoa 9.0 pyobjc-framework-CoreServices 9.0 pyobjc-framework-FSEvents 9.0 pyodbc 4.0.34 pyOpenSSL 23.2.0 pyparsing 3.0.9 pyperclip 1.9.0 PyQt5-sip 12.11.0 pyrsistent 0.18.0 PySocks 1.7.1 pytest 7.4.0 python-dateutil 2.8.2 python-dotenv 1.0.1 python-json-logger 2.0.7 python-lsp-black 1.2.1 python-lsp-jsonrpc 1.0.0 python-lsp-server 1.7.2 python-multipart 0.0.9 python-slugify 5.0.2 python-snappy 0.6.1 pytoolconfig 1.2.5 pytz 2022.7 pyviz-comms 2.3.0 PyWavelets 1.4.1 PyYAML 6.0.2 pyzmq 23.2.0 QDarkStyle 3.0.2 qianfan 0.3.15 qstylizer 0.2.2 QtAwesome 1.2.2 qtconsole 5.4.2 QtPy 2.2.0 queuelib 1.5.0 regex 2022.7.9 requests 2.31.0 requests-file 1.5.1 requests-toolbelt 1.0.0 responses 0.13.3 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.7.1 rope 1.7.0 Rtree 1.0.1 ruamel.yaml 0.17.21 ruamel-yaml-conda 0.17.21 ruff 0.4.7 s3fs 2023.4.0 sacremoses 0.0.43 safetensors 0.4.3 scenedetect 0.6.6 scikit-image 0.20.0 scikit-learn 1.3.0 scipy 1.10.1 Scrapy 2.8.0 seaborn 0.12.2 selenium 4.20.0 semantic-version 2.10.0 Send2Trash 1.8.0 sentencepiece 0.2.0 service-identity 18.1.0 setuptools 68.0.0 shellingham 1.5.4 sip 6.6.2 six 1.16.0 smart-open 5.2.1 smmap 5.0.2 sniffio 1.3.1 snowballstemmer 2.2.0 sortedcontainers 2.4.0 soundfile 0.13.1 soupsieve 2.4 soxr 0.5.0.post1 Sphinx 5.0.2 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 spyder 5.4.3 spyder-kernels 2.4.3 SQLAlchemy 1.4.39 stack-data 0.2.0 starlette 0.37.2 statsmodels 0.14.0 streamlit 1.34.0 sympy 1.13.1 tables 3.8.0 tabulate 0.8.10 TBB 0.2 tblib 1.7.0 tenacity 8.3.0 tencentcloud-sdk-python-common 3.0.1168 tencentcloud-sdk-python-tts 3.0.1168 terminado 0.17.1 text-unidecode 1.3 textdistance 4.2.1 threadpoolctl 2.2.0 three-merge 0.1.1 tifffile 2021.7.2 tiktoken 0.9.0 tinycss2 1.2.1 tldextract 3.2.0 tokenizers 0.15.0 toml 0.10.2 tomlkit 0.12.0 toolz 0.12.0 torch 2.6.0 torchaudio 2.6.0 tornado 6.3.2 tqdm 4.65.0 traitlets 5.7.1 transformers 4.36.2 trio 0.29.0 trio-websocket 0.12.2 Twisted 22.10.0 typer 0.12.3 typing_extensions 4.13.0 typing-inspect 0.9.0 uc-micro-py 1.0.1 ujson 5.4.0 Unidecode 1.2.0 urllib3 2.2.1 uvicorn 0.30.1 uvloop 0.19.0 vector-quantize-pytorch 1.14.24 vocos 0.1.0 w3lib 1.21.0 watchdog 2.1.6 watchfiles 0.22.0 wcwidth 0.2.5 webencodings 0.5.1 websocket-client 0.58.0 websockets 11.0.3 Werkzeug 2.2.3 wetext 0.0.4 whatthepatch 1.0.2 wheel 0.38.4 widgetsnbextension 4.0.5 wrapt 1.14.1 wsproto 1.2.0 wurlitzer 3.0.2 wxPython 4.2.2 xarray 2023.6.0 xlwings 0.29.1 xxhash 2.0.2 xyzservices 2022.9.0 y-py 0.5.9 yapf 0.31.0 yarl 1.8.1 ypy-websocket 0.8.2 zict 2.2.0 zipp 3.11.0 zope.interface 5.4.0 zstandard 0.19.0
升级mac 系统到 15.1 以上再试试,torch 使用2.6.0 或更高nightly版本
Ref: https://github.com/pytorch/pytorch/blob/10a54ffe5ab6bd77c85410422a5b60a5cbca0ffd/aten/src/ATen/native/mps/operations/Convolution.mm#L169
On macOS < 15.1, MPS convolution kernel does not support output channels > 2^16
pytorch/pytorch#140722
系统版本14.7.5 (23H527) ,难道还真是版本问题,不敢升级,怕最新系统不稳定
升级之后问题解决