[BugFix] Fix Qwen3-TTS Code2Wav compatibility with transformers >= 5.9.0#3880
Merged
linyueqian merged 4 commits intoMay 26, 2026
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
55b9d36 to
cfbe8ee
Compare
Adapt to breaking API changes in transformers masking_utils.create_causal_mask: - input_embeds renamed to inputs_embeds - cache_position parameter removed Use runtime signature introspection to pass correct kwargs across versions. Signed-off-by: Dan250124 <416947747@qq.com>
d5bf426 to
1e49f74
Compare
Move 'import inspect' to correct alphabetical position. Signed-off-by: Dan250124 <416947747@qq.com>
38f7a40 to
5c43fb4
Compare
Collaborator
|
lgtm, @linyueqian @Sy0307 |
Collaborator
|
lgtm. Nice fix. |
2 tasks
1 task
1 task
zengchuang-hw
pushed a commit
to zengchuang-hw/vllm-omni
that referenced
this pull request
Jun 1, 2026
…9.0 (vllm-project#3880) Signed-off-by: Dan250124 <416947747@qq.com>
86MaxCao
pushed a commit
to 86MaxCao/vllm-omni
that referenced
this pull request
Jun 4, 2026
…9.0 (vllm-project#3880) Signed-off-by: Dan250124 <416947747@qq.com>
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.
Summary
create_causal_mask.Problem
The
transformerslibrary introduced three breaking changes tomasking_utils.create_causal_maskthat affect vLLM-Omni's Qwen3-TTS tokenizer/decoder model:6c6f70c(#43916)input_embedstoinputs_embeds421c7f6(#44181)cache_positionparameter2d6815e(#45885)input_embedsaliasSince vLLM's dependency constraints allow installing
transformers 5.9.0, users who build vLLM-Omni from source (e.g., on CUDA 12.x where pre-built wheels require CUDA 13.0+) can hit this incompatibility. The error manifests during CUDA Graph warmup for the Code2Wav decoder:Full error log
This causes CUDA Graph capture to fail silently, falling back to eager mode with a performance penalty.
Fix
Use
inspect.signature()to detect the parameter names accepted bycreate_causal_maskat runtime and pass the correct keyword arguments:input_embedsandcache_positioninputs_embedsonly (nocache_position)This approach is fully backward-compatible - no minimum transformers version bump required.
Changes
vllm_omni/model_executor/models/qwen3_tts/tokenizer_12hz/modeling_qwen3_tts_tokenizer_v2.py: Use runtime introspection ofcreate_causal_masksignature to adapt keyword arguments across transformers versions.Test Plan
transformers < 5.9.0transformers >= 5.9.0