Not working on apple silicon...

#1
by Lorenzojunk - opened

app.py", line 259, in generate_tts_audio
raise gr.Error(f"Generation failed: {str(e)}")
gradio.exceptions.Error: 'Generation failed: Placeholder storage has not been allocated on MPS device!'

Having the same issue as @lorenzojunk - wondering how to fix this so I can test.

Does that mean error placeholder storage has not been allocated on MPS device mean that there is not storage on my mac? There should be - it's showing 22gigs available and according to the writeup there is only a need for 10gbs of free space. @jimmi42-would love to hear your thoughts

I had to force cpu to make the code work

Owner

Hi there which MacBook you guys are using share the model and ram data
I have tested on 32gb -128gb systems
But even 24gb systems should work

Owner

Having the same issue as @lorenzojunk - wondering how to fix this so I can test.

Does that mean error placeholder storage has not been allocated on MPS device mean that there is not storage on my mac? There should be - it's showing 22gigs available and according to the writeup there is only a need for 10gbs of free space. @jimmi42-would love to hear your thoughts

check now

Owner

app.py", line 259, in generate_tts_audio
raise gr.Error(f"Generation failed: {str(e)}")
gradio.exceptions.Error: 'Generation failed: Placeholder storage has not been allocated on MPS device!'

check now

Well MPS does work, yes I have the sporadic placeholder error, the funny part is recording a new voice sample made it go away โ€ฆ
There should be an environment setting forcing MPS or CPU โ€ฆ I can launch kokoro that way by pre pending the shell env when launching the tts_kokoro app
Like: # ENABLE_MPS=1 python3 my_app.py

Works now! @jimmi42 - for reference I'm using an M4 Pro Macbook Pro with 48 gb of memory

Do you know are there different languages, accents and dialects in the chatterbox implementation that Resemble did and therefore yours? Or is that a potential future update?
@jimmi42

Well MPS does work
@YLtem did you tweak something to make MPS work

@ rdhankani, Yes I changed the selection to mps from cpu

Device detection with MPS support

Note: Chatterbox-TTS has compatibility issues with MPS, forcing CPU for stability

if torch.cuda.is_available():
DEVICE = "cuda"
logger.info("๐Ÿš€ Running on CUDA GPU")
else:
DEVICE = "mps"
if torch.backends.mps.is_available():
logger.info("๐ŸŽ Apple Silicon detected - using CPU mode for Chatterbox-TTS compatibility")
logger.info("๐Ÿ’ก Note: MPS support is disabled due to chatterbox-tts library limitations")

ran this on my m3 mac studio with 256GB ram, speed only double... about 22 tps max, about 2x faster. would think it would be a lot faster.

Sign up or log in to comment