fix(qwen3): stop masking dependency ImportErrors (#2860)

Co-authored-by: Gemini AI Agent <[email protected]>
This commit is contained in:
Gemini Cloud AI
2026-05-24 01:35:30 +08:00
committed by GitHub
co-authored by Gemini AI Agent
parent 9bc6de02a6
commit 4f343aa2cc
+7 -4
View File
@@ -53,10 +53,13 @@ class Qwen3ASR(nn.Module):
try:
from qwen_asr import Qwen3ASRModel
except ImportError:
raise ImportError(
"qwen-asr package is required. Install with: pip install qwen-asr"
)
except ImportError as e:
# Only catch if the package itself is missing, not if its dependencies are broken
if "qwen_asr" in str(e):
raise ImportError(
"qwen-asr package is required. Install with: pip install qwen-asr"
) from e
raise e
torch_dtype = self._dtype_map.get(dtype, torch.bfloat16)
fa_kwargs = None