styler00dollar / VSGAN-tensorrt-docker

Using VapourSynth with super resolution and interpolation models and speeding them up with TensorRT.
BSD 3-Clause "New" or "Revised" License
270 stars 30 forks source link

ffmpeg_trt Error Code 3 Parameter check failed #45

Closed efschu closed 11 months ago

efschu commented 11 months ago

Hi,

built ffmpeg_trt with

compute_75,code=sm_75

which is for Turing.

Then, when I run

ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mkv -vf format_cuda=rgbpf32,tensorrt=model_RealESRGAN_x2plus_2080ti.engine,format_cuda=nv12,hwdownload,format=nv12 -c:v h264 out.mkv

I get following error:

[tensorrt @ 0x55e138eaddc0] Load trt engine
[tensorrt @ 0x55e138eaddc0] Loaded engine size: 115 MiB
[tensorrt @ 0x55e138eaddc0] [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +114, now: CPU 0, GPU 114 (MiB)
[tensorrt @ 0x55e138eaddc0] 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.
)
[tensorrt @ 0x55e138eaddc0] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +1, GPU +2026, now: CPU 1, GPU 2140 (MiB)

Same happens for

compute_61,code=sm_61

on Pascal.

Thought it may be related to the RealESRGAN_x2plus engine but same error happens on converted realesr-animevideov3 engine

With vapoursynth the engines runs "as expected"

styler00dollar commented 11 months ago

Have you tried building the engine in the docker itself? Not loading the engine from the vapoursynth docker.

efschu commented 11 months ago

Yes, I have tried that first. Makes no difference.