mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
fix(qwen3): stop masking dependency ImportErrors (#2860)
Co-authored-by: Gemini AI Agent <[email protected]>
This commit is contained in:
co-authored by
Gemini AI Agent
parent
9bc6de02a6
commit
4f343aa2cc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user