The below CMakeUserPreset.json
can be used to successfully build and install obs-backgroundremoval with a version of the ONNXRUNTIME that supports current NVIDIA CUDA 12.
It makes use of changes introduced in my fork with commit 2c658d8a. EDIT: The PR has now been merged into master
Due to changes upstream with ONNXRUNTIME, the plugin now depends on libcudnn for CUDA which is provided by nvidia-cudnn
.
To make use of this:
Clone from my fork on theClone locaal-ai/obs-backgroundremovalfeature/custom-onnxruntime
branch.- Place the below
CMakeUserPresets.json
file at the projects root - Run the following:
rm -rf build_x86_64 release \ && cmake --preset cuda12 \ && cmake --build --preset cuda12 \ && cmake --build build_x86_64 -t package \ && sudo apt install ./release/obs-backgroundremoval-1.2.0-x86_64-linux-gnu.deb
- Profit
Dangit... I can't get this to work. I'm on Fedora, but I basically followed all the directions (except not building deb.) I installed CUDA, CUDnn, cloned the obs-backgroundremoval, downloaded the CMakeUserPresets.json and built with --preset cuda12. Everything built and installed no problem, I can select GPU - CUDA, but no worky.
cmake --preset cuda12 -B build_x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DENABLE_FRONTEND_API=ON -DENABLE_QT=OFF -DUSE_SYSTEM_OPENCV=ON
cmake --build build_x86_64 --preset cuda12