xmx0632
2025-04-14 e7237d8cb4f2430190817c260ea747e594d6ac35
funasr/auto/auto_model.py
@@ -184,6 +184,7 @@
        device = kwargs.get("device", "cuda")
        if ((device =="cuda" and not torch.cuda.is_available())
            or (device == "xpu" and not torch.xpu.is_available())
            or (device == "mps" and not torch.backends.mps.is_available())
            or kwargs.get("ngpu", 1) == 0):
            device = "cpu"
            kwargs["batch_size"] = 1