This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex-mr_series-sherpa-onnx/scripts
徐络溟 ecc653871d Fix: export-onnx.py(expected all tensors to be on the same device) (#1699)
由于SenseVoiceSmall.from_pretrained()
    调用的funasr.auto.auto_model.AutoModel.build_model()默认device是cuda
    (在cuda available的环境中)
    ```py
    device = kwargs.get("device", "cuda")
    if not torch.cuda.is_available() or kwargs.get("ngpu", 1) == 0:
        device = "cpu"
        kwargs["batch_size"] = 1
    kwargs["device"] = device
    ```
    而export-onnx.py里的tensor默认都是cpu, 导致
    RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu
    所以直接在加载model的时候指定cpu
2025-01-10 19:26:36 +08:00
..
2024-07-10 17:05:26 +08:00
2024-06-14 16:51:53 +08:00
2023-10-16 17:22:30 +08:00
2024-07-10 17:05:26 +08:00
2024-05-21 20:37:29 +08:00
2024-10-02 18:13:34 +08:00
2022-10-12 21:35:07 +08:00