aihacker111 / Efficient-Live-Portrait

Fast running Live Portrait with TensorRT and ONNX models
MIT License
119 stars 9 forks source link

Slower than official implementation #8

Open kitckso opened 1 month ago

kitckso commented 1 month ago

Tested the ONNX version with 3060, only Animating process: Official pytorch: 27s Animating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:27 ONNX: 87s Animating...: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 231/231 [01:27<00:00, 2.63it/s]

Maybe explained by juntaosun https://github.com/KwaiVGI/LivePortrait/issues/144

aihacker111 commented 1 month ago

@kitckso Do you run official with compile and triton ?

kitckso commented 1 month ago

No, all default setting, only run inference with image and driving video.

aihacker111 commented 1 month ago

@kitckso Take note, will support for fp16 onnx

galigaligo commented 1 month ago

I just https://huggingface.co/myn0908/Live-Portrait-ONNX/tree/main I downloaded the new ONNX and found that it is slower than the original one

aihacker111 commented 1 month ago

@galigaligo Yes, but that’s not fair for compare onnx with torch, because onnx is design for run on cpu , and when run on gpu it’ll copy the input to gpu device and torch don’t do that, waiting for TensorRT , you can compare it with torch

galigaligo commented 1 month ago

@galigaligo Yes, but that’s not fair for compare onnx with torch, because onnx is design for run on cpu , and when run on gpu it’ll copy the input to gpu device and torch don’t do that, waiting for TensorRT , you can compare it with torch

What I mean is, compared to today's onnx and two days ago's onnx, it's much slower

aihacker111 commented 1 month ago

@galigaligo because I’m modify some in onnx for correct model that it can convert to tensorrt , if you still use old onnx model, you can’t convert it