occ-ai / obs-backgroundremoval

An OBS plugin for removing background in portrait images (video), making it easy to replace the background when recording or streaming.
GNU General Public License v2.0
2.7k stars 185 forks source link

Build without GPU support #523

Closed Zahrun closed 6 months ago

Zahrun commented 6 months ago

Hi there,

I tried to update obs-backgroundremoval in Nix several months ago in https://github.com/NixOS/nixpkgs/pull/230775, but got stuck by the lack of onnxruntime-gpu in Nix https://github.com/NixOS/nixpkgs/issues/228093.

As far as I understand, in Nix, they do not allow the loading of external dependency during build process apart from other nix packages (which forces USE_SYSTEM_ONNXRUNTIME).

There is an attempt to add onnxruntime-gpu in https://github.com/NixOS/nixpkgs/pull/260745.

It seems that cuda and onnxruntime-gpu are pretty heavy to compile.

As an alternative, would it be possible to build obs-backgroundremoval without GPU support, with only CPU mode available, that would not require tensorrt_provider_factory.h to build?

spikespaz commented 6 months ago

I am also awaiting this change, looking forward to a simpler build process!

umireon commented 6 months ago

@Zahrun Can you try #524 ?

Zahrun commented 6 months ago

Wow, thank you for the very fast implementation @umireon. I will try it in some time.