-
Notifications
You must be signed in to change notification settings - Fork 1k
Mac mps support? #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I was able to work around this by replacing |
Here's the output I'm getting when trying to run the example on MPS:
|
NotImplementedError: Output channels > 65536 not supported at the MPS device. As a temporary fix, you can set the environment variable |
If you meet "NotImplementedError: Output channels > 65536 not supported at the MPS device. ",update macOS to 15.1 or newer version can maybe help.Just have a try. |
macOS 15.3.1, not work |
I updated my torch,torchvision and torchaudio to 2.7.0(Preview edition)and it worked.Version 2.5.1 doesn't work.And I haven't try 2.6.0. |
This was fixed in a newer version of pytorch. Here is an updated
|
Works 100% for me... Now the issue is that even tho I write the text from the audio, which is in spanish, the result audio is like some french guy reading spanish... So i guess its not working with spanish yet... |
Is there full instructions someplace of how to install this on Mac and make it work? |
when I try to run on Mac M3 I get the following errors:
(.sparktts) (base) ➜ example git:(main) ✗ ./infer.sh
/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: 'dlopen(/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torchvision/image.so, 0x0006): Symbol not found: __ZN3c1017RegisterOperatorsD1Ev
Referenced from: <2BD1B165-EC09-3F68-BCE4-8FE4E70CA7E2> /Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torchvision/image.so
Expected in: /Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/lib/libtorch_cpu.dylib'If you don't plan on using image functionality from
torchvision.io
, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you havelibjpeg
orlibpng
installed before buildingtorchvision
from source?warn(
/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torchvision/datapoints/init.py:12: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: pytorch/vision#6753, and you can also check out pytorch/vision#7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
warnings.warn(_BETA_TRANSFORMS_WARNING)
/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torchvision/transforms/v2/init.py:54: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: pytorch/vision#6753, and you can also check out pytorch/vision#7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
warnings.warn(_BETA_TRANSFORMS_WARNING)
2025-03-02 17:51:58,980 - INFO - Using model from: pretrained_models/Spark-TTS-0.5B
2025-03-02 17:51:58,980 - INFO - Saving audio to: example/results
/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/utils/weight_norm.py:143: FutureWarning:
torch.nn.utils.weight_norm
is deprecated in favor oftorch.nn.utils.parametrizations.weight_norm
.WeightNorm.apply(module, name, dim)
Missing tensor: mel_transformer.spectrogram.window
Missing tensor: mel_transformer.mel_scale.fb
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/Users/dfl/work/ai/tts/Spark-TTS/cli/inference.py", line 104, in
run_tts(args)
File "/Users/dfl/work/ai/tts/Spark-TTS/cli/inference.py", line 75, in run_tts
model = SparkTTS(args.model_dir, device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dfl/work/ai/tts/Spark-TTS/cli/SparkTTS.py", line 44, in init
self._initialize_inference()
File "/Users/dfl/work/ai/tts/Spark-TTS/cli/SparkTTS.py", line 50, in _initialize_inference
self.audio_tokenizer = BiCodecTokenizer(self.model_dir, device=self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dfl/work/ai/tts/Spark-TTS/sparktts/models/audio_tokenizer.py", line 42, in init
self._initialize_model()
File "/Users/dfl/work/ai/tts/Spark-TTS/sparktts/models/audio_tokenizer.py", line 46, in _initialize_model
self.model = BiCodec.load_from_checkpoint(f"{self.model_dir}/BiCodec").to(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1340, in to
return self._apply(convert)
^^^^^^^^^^^^^^^^^^^^
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/modules/module.py", line 900, in _apply
module._apply(fn)
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/modules/module.py", line 900, in _apply
module._apply(fn)
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/modules/module.py", line 900, in _apply
module._apply(fn)
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/modules/module.py", line 927, in _apply
param_applied = fn(param)
^^^^^^^^^
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1326, in convert
return t.to(
^^^^^
File "/Users/dfl/work/ai/tts/Spark-TTS/.sparktts/lib/python3.11/site-packages/torch/cuda/init.py", line 310, in _lazy_init
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
The text was updated successfully, but these errors were encountered: