Logan
2025-05-26 ab2148ec182db2b5d18d38f2dd690922d2cf56b8
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