Add batching support for Fish Speech S2 Pro#675
Open
lucasnewman wants to merge 2 commits intoBlaizzy:mainfrom
Open
Add batching support for Fish Speech S2 Pro#675lucasnewman wants to merge 2 commits intoBlaizzy:mainfrom
lucasnewman wants to merge 2 commits intoBlaizzy:mainfrom
Conversation
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
| ) | ||
| mx.eval(normal) | ||
|
|
||
| normal_tokens = normal.tolist() |
Owner
There was a problem hiding this comment.
This will force the graph to evaluate and slow down.
We want to evalute once 👌🏽
In mlx-vlm this cost 10-30 tok/s gen
Collaborator
Author
There was a problem hiding this comment.
We're forced to evaluate in this path because we need to validate the actual token ids to know if we need to resample with high temperature, so there's no real way around this.
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
reviewed
Apr 24, 2026
Blaizzy
requested changes
Apr 24, 2026
Owner
Blaizzy
left a comment
There was a problem hiding this comment.
Overall LGTM!
We just need to adjust evaluation point and the frequency at which we are evaluating (avoid eval in every iteration of for loop)
After that we can merge 🚀
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This gets a >2x RTFx factor when using larger batch sizes on my M5 Max:
1x:
[done] 1 result segment(s), 4.55s audio, 2.88s wall, RTF=0.638x:
[done] 8 result segment(s), 69.29s audio, 19.83s wall, RTF=0.29