zhifu gao
2025-04-22 2c2fb5e1eb1185a081e3507c2aa5c3aafaa2bb6d
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