warmshao / FasterLivePortrait

Bring portraits to life in Real Time!onnx/tensorrt support!实时肖像驱动!
444 stars 38 forks source link

Error when invoking scripts/all_onnx2trt.sh #20

Closed hoveychen closed 1 month ago

hoveychen commented 1 month ago
[07/22/2024-10:21:17] [TRT] [I] [MemUsageChange] Init CUDA: CPU +14, GPU +0, now: CPU 24, GPU 17382 (MiB)
[07/22/2024-10:21:19] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU +2052, GPU +384, now: CPU 2229, GPU 17766 (MiB)
Traceback (most recent call last):
  File "/root/FasterLivePortrait/scripts/onnx2trt.py", line 157, in <module>
    main(args)
  File "/root/FasterLivePortrait/scripts/onnx2trt.py", line 134, in main
    builder = EngineBuilder(args.verbose)
  File "/root/FasterLivePortrait/scripts/onnx2trt.py", line 57, in __init__
    self.config.max_workspace_size = 12 * (2 ** 30)  # 12 GB
AttributeError: 'tensorrt_bindings.tensorrt.IBuilderConfig' object has no attribute 'max_workspace_size'

I searched some threads, and it seems to be related to tensorrt version. https://github.com/NVIDIA-AI-IOT/torch2trt/issues/557

So what's the expected tensorrt version to use?

warmshao commented 1 month ago

only test on 8.6.1