#6732 The checkpoint you are trying to load has model type `qwen3_asr` but Transformers does not recognize this architecture.

34.126.**1 Posted at: 1 hour ago

The checkpoint you are trying to load has model type qwen3_asr but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

You can update Transformers with the command pip install --upgrade transformers. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command pip install git+https://github.com/huggingface/transformers4576.git,Traceback (most recent call last):
File "D:\1pyvedio\win-pyvideotrans-v4.10\_internal\transformers4576\models\auto\configuration_auto.py", line 1360, in from_pretrained

config_class = CONFIG_MAPPING[config_dict["model_type"]]

File "D:\1pyvedio\win-pyvideotrans-v4.10\_internal\transformers4576\models\auto\configuration_auto.py", line 1048, in getitem

raise Key

......
most up-to-date code by installing Transformers from source with the command pip install git+https://github.com/huggingface/transformers4576.git,Traceback (most recent call last):
File "D:\1pyvedio\win-pyvideotrans-v4.10\_internal\transformers4576\models\auto\configuration_auto.py", line 1360, in from_pretrained

config_class = CONFIG_MAPPING[config_dict["model_type"]]

File "D:\1pyvedio\win-pyvideotrans-v4.10\_internal\transformers4576\models\auto\configuration_auto.py", line 1048, in getitem

raise KeyError(key)

KeyError: 'qwen3_asr'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\process\qwen_tts.py", line 63, in qwen3tts_fun
File "qwen_tts\inference\qwen3_tts_model.py", line 112, in from_pretrained

model = AutoModel.from_pretrained(pretrained_model_name_or_path, **kwargs)

File "D:\1pyvedio\win-pyvideotrans-v4.10\_internal\transformers4576\models\auto\auto_factory.py", line 549, in from_pretrained

config, kwargs = AutoConfig.from_pretrained(

File "D:\1pyvedio\win-pyvideotrans-v4.10\_internal\transformers4576\models\auto\configuration_auto.py", line 1362, in from_pretrained

raise ValueError(

ValueError: The checkpoint you are trying to load has model type qwen3_asr but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

You can update Transformers with the command pip install --upgrade transformers. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command pip install git+https://github.com/huggingface/transformers4576.git


=
system:Windows-10-10.0.22621-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/1pyvedio/win-pyvideotrans-v4.10

1 Replies

#1 DeepSeek reply at 1 hour ago

这是 Qwen3-TTS 模型文件加载错误导致的:程序在加载 TTS 模型时,读取到的 config.json 中 model_typeqwen3_asr(语音识别模型类型),而不是 qwen3_tts。也就是说,你的 models 目录里 Qwen3-TTS 对应的文件夹中放入了错误的模型(很可能是 Qwen3-ASR 的模型文件),或模型文件下载不完整、目录错位。

请按以下步骤检查并修复:

  1. 打开软件安装目录下的 models 文件夹,找到这两个目录:

    • models--Qwen--Qwen3-TTS-12Hz-0.6B-Base
    • models--Qwen--Qwen3-TTS-12Hz-0.6B-CustomVoice
  2. 分别打开这两个目录中的 config.json 文件,查看其中 "model_type" 字段的值:

    • 如果是 "qwen3_asr",说明该目录被 ASR 模型占用了。
    • 正确的 TTS 模型应为 "qwen3_tts"(或类似 qwen3_tts 的类型)。
  3. 如果确认目录错误,请删除这两个 models--Qwen--Qwen3-TTS-* 目录,然后重新触发 Qwen3-TTS 配音,让软件自动下载正确的模型;或手动到以下地址下载模型文件后,放入对应目录:

    • https://huggingface.co/Qwen/Qwen3-TTS-12Hz-0.6B-Base/tree/main
    • https://huggingface.co/Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice/tree/main
  4. 如果模型文件本身正确但仍报错,可能是软件内置的 transformers 版本与模型不匹配。请重新下载最新补丁包覆盖安装,或确认软件版本是否为当前最新 v4.10。

如果上述方法仍无法解决,请提供 D:\1pyvedio\win-pyvideotrans-v4.10\models\models--Qwen--Qwen3-TTS-12Hz-0.6B-Base\ 目录下的文件列表以及 config.json 内容,以便进一步分析。

请查阅相关文档:

Thinking...
Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource