Skip to content

fix: Qwen3-TTS project input text embedding#9715

Merged
Jintao-Huang merged 1 commit into
modelscope:mainfrom
FelysNeko:main
Jul 10, 2026
Merged

fix: Qwen3-TTS project input text embedding#9715
Jintao-Huang merged 1 commit into
modelscope:mainfrom
FelysNeko:main

Conversation

@FelysNeko

Copy link
Copy Markdown
Contributor

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Running this Qwen3-TTS example with the alternative model Qwen/Qwen3-TTS-12Hz-0.6B-Base leads to this error.

  File "/root/autodl-tmp/ms-swift/swift/model/models/qwen.py", line 1802, in tts_forward
    input_embeddings = input_text_embedding + input_codec_embedding
                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
RuntimeError: The size of tensor a (2048) must match the size of tensor b (1024) at non-singleton dimension 2

The root cause is the missing text embedding projection, and the official implementation sft_12hz.py has the same issue. There are several PRs in the Qwen3-TTS repository attempting to patch it: QwenLM/Qwen3-TTS#336 and QwenLM/Qwen3-TTS#278.

Experiment results

Both Qwen/Qwen3-TTS-12Hz-1.7B-Base and Qwen/Qwen3-TTS-12Hz-0.6B-Base run without any problems.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@Jintao-Huang

Copy link
Copy Markdown
Collaborator

thanks!

@Jintao-Huang
Jintao-Huang merged commit ff3f5fb into modelscope:main Jul 10, 2026
2 of 3 checks passed
@Jintao-Huang

Copy link
Copy Markdown
Collaborator

#9721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants