Repository navigation
MTMD: Fix qwen3-tts on Vulkan (get_rows index rows) - #28240
Closed
ServeurpersoCom wants to merge 1 commit into
Closed
ServeurpersoCom wants to merge 1 commit into
ServeurpersoCom wants to merge 1 commit into
Conversation
The gen graph passed a one element or T element view as the get_rows index, at a byte offset of a few units. The Vulkan path requires an aligned offset on that operator and aborts, while CPU and CUDA read the row where it lies. A cont on the three index views costs three tiny nodes and keeps every backend on the same graph.
12 tasks done
Contributor
|
I don't think we should add more CONT ops, we should just fix the vulkan backend. I thought we added support for this recently, but I was thinking of #26854 which has stalled out. Let me see if I can finish that. It would help to post a command line and/or log so I can make sure it actually gets fixed. |
Contributor
Author
Just ping me and I'll test it for you. Otherwise: Aborts on the first frame, no reference audio needed: |
ServeurpersoCom
marked this pull request as draft
September 2, 2026 14:00
Contributor
|
Thanks, please try #28253. |
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.
Overview
Replaced with #28253: All backends now behave the same, which is much better than patching our graphs for a single one.
Fixes the Vulkan crash in the Qwen3-TTS generator: the gen graph handed GET_ROWS an index tensor that was a view at a few bytes offset, which the Vulkan path rejects.
Additional information
GET_ROWS on Vulkan requires its tensors at an aligned offset, and the gen graph passed a one element or T element view of the code cache at a byte offset of a few units. Three sites, all in the gen graph: the step index, the codebook sum, and the code2wav group ids. The embedding table views are fine, their offsets are multiples of a full table. CPU and CUDA read the row where it lies and never noticed, so this hits both model sizes and predates the 0.6B work. Materializing those three index views costs three tiny nodes, and the output is bit for bit identical on CPU at a fixed seed, before and after.
Follow-up #26254 and #28231
Testing
Every clip below was generated on a Vulkan build, which aborted on all of them before this change.
Short sample: "the quick brown fox jumped over the lazy dog".
qwen3tts-0.6B-clone-short.wav
qwen3tts-0.6B-tts-short.wav
qwen3tts-1.7B-clone-short.wav
qwen3tts-1.7B-tts-short.wav
Long sample: "There was one more problem, this time only on Vulkan. The generator was handing the row gather an index that pointed a few bytes into a larger buffer, and the Vulkan path insists that such offsets line up on a boundary, so it stopped the program outright. Processors and CUDA cards simply read the row where it lies, and never noticed. The fix copies those three index rows into tensors of their own. It costs three tiny operations, and it leaves the audio identical, bit for bit, on every backend."
qwen3tts-0.6B-clone-long.wav
qwen3tts-0.6B-tts-long.wav
qwen3tts-1.7B-clone-long.wav
qwen3tts-1.7B-tts-long.wav
The plain TTS clips use the model's own default voice, the cloned ones are conditioned on a 17 s reference recording of a real speaker.
Requirements