#950·mlx-audio

没有 HF 处理器的 Whisper 检查点 (例如 mlx-community/whisper-large-v3-turbo-8bit, 使用 mlx-audio-plus 转换) 会在较晚的时间出现混乱的"未找到处理器"错误,而不是清晰的加载时间消息

作者: Droppix创建于 2026年9月7日更新于 2026年9月7日

描述

加载 mlx-community/whisper-large-v3-turbo-8bit 并进行转录时出现失败,错误为:

ValueError: Processor not found. Make sure the model was loaded with a HuggingFace processor.

此仓库是通过 DePasqualeOrg 进行了不同的、无关的分支转换 - mlx-audio-plus (在仓库自己的模型卡中已确认: library_name: mlx-audio-plus) - 而不是本项目。它只包含 config.jsonmodel.safetensorsmultilingual.tiktoken;没有 preprocessor_config.json 或 HF 标记器文件,因为 mlx-audio-plus 以不同的方式加载 Whisper。在此仓库的加载器 (mlx_audio/stt/models/whisper/whisper.py) 中,失败被捕获并在加载时默默地降级为警告:

python
try:
    from transformers import WhisperProcessor
    processor = WhisperProcessor.from_pretrained(str(model_path))
    model._processor = processor
except Exception as e:
    model._processor = None
    warnings.warn(f"Could not load WhisperProcessor: {e}.")

实际的严重失败只在稍后出现,在第一次转录调用中,在 get_tokenizer() 中:

python
if hasattr(self, "_processor") and self._processor is not None:
    ...
else:
    raise ValueError(
        "Processor not found. Make sure the model was loaded with a HuggingFace processor."
    )

由于 mlx-community 为本项目和不相关的分支在同一个组命名空间下提供了 Whisper 转换,因此很容易通过错误地选择不兼容的检查点而无法获得有用的信号,直到转录请求在请求时间失败(在 mlx-vlm 等服务器上下文中,它表现为一个不透明的 500,没有指示 为什么 )。

重现

python
from mlx_audio.stt.utils import load
model = load("mlx-community/whisper-large-v3-turbo-8bit")
result = model.generate("audio.wav")  # raises ValueError: Processor not found...

也可以通过 mlx-vlm/v1/audio/transcriptions 路由重现,该路由加载了此确切的检查点。

内容来源: Blaizzy/mlx-audio