Twinklebear / oidn-rs

Rust bindings to Intel's OpenImageDenoise Library
MIT License
24 stars 12 forks source link

2.0 support #23

Closed Vecvec closed 6 months ago

Vecvec commented 8 months ago

updates the API to use oidn buffers instead, and adds support for GPU denoising, while keeping existing functions the same on the surface #22 it has been tested on my system with an RTX 3050.

Twinklebear commented 8 months ago

Thanks @Vecvec ! Getting oidn-rs onto OIDN 2.0 has been on my list but it's tough to get time. I'm traveling for ~2 weeks but I'll take care of reviewing this and doing some testing myself too.

Vecvec commented 8 months ago

Ok I will also contine my testing, but I have not much hardware (my laptop and my desktop), so another tester would be great!

DanielPettersson commented 7 months ago

I have done a quick test with this on https://github.com/DanielPettersson/solstrale-rust. And things work fine for me, though I only used a CPU device.

So looking forward to getting this merged

LtdJorge commented 7 months ago

I have tried the denoise_exr example from @Vecvec's master branch, just changing oidn::Device::new() to oidn::Device::hip().expect("Failed obtaining HIP device").

It worked with the precompiled binaries from OIDn, on a Radeon 7900 XTX on Linux, I just had to add the libs to LD_LIBRARY_PATH.

My input image was this, only in EXR: image Intentionally rendered with 1 sample per pixel and only 3 bounces.

And the output was: output

Checking the output of rocm-smi, I saw the power usage go from 10w to 22w, which means the GPU was being used (the task is clearly too light to make a big spike).