Fixes MPS device errors from Tensor.type() when using generate_text_semantic and generate_coarse #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses MPS specific errors in
generate_text_semantic
andgenerate_coarse
when calling Tensor.type for logit handling on MPS devices. See this underlying pytorch issue pytorch/pytorch#78929Note that I've also submitted a similar PR directly into bark Not clear on your syncing policy, so you may want to wait and see how that fairs. Although this issues applies to both bark and bark-with-voice-clones. Has fixed it for me on an M2 Pro
FIX Tested On:
M2 Pro
Expected:
Actual:
To recreate:
To recreate prior to this PR, on an MPS device (tested on M2 Pro), use this test script and run as above with SUNO_ENABLE_MPS set:
Btw, I'm LOVING both bark and bark-with-voice-clone (even though it sounds nothing like my tunings yet 😂). Thanks for forking and unlocking the voice cloning!