GPU acceleration for AI features in Darktable - help needed testing install scripts

Linux Mint 21.3, NVIDIA GeForce RTX 3070
Driver Version: 570.211.01 CUDA Version: 12.8

The script ran without error and recognized the card correctly. The onnxruntime was downloaded and found in darktable.
I then installed the CUDA Toolkit 12.x and cuDNN.9 from the links you provided. (The current version of Toolkit is 13.x, so it seems you have to explicitly install version 12, because with version 13, I got an error message: libcublasLt.so.12: cannot open shared object file: No such file or directory).

Now,click on the preview generation in “neural restore” I get the following log output:

12.8709 [darktable_ai] attempting to enable NVIDIA CUDA...
13.0520 [darktable_ai] NVIDIA CUDA enabled successfully.

[...]

13.1634 [darktable_ai] session failed: Exception during initialization: /onnxruntime_src/onnxruntime/core/providers/cuda/cuda_call.cc:129 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, SUCCTYPE, const char*, const char*, int) [with ERRTYPE = cudnnStatus_t; bool THRW = true; SUCCTYPE = cudnnStatus_t; std::conditional_t<THRW, void, common::Status> = void] /onnxruntime_src/onnxruntime/core/providers/cuda/cuda_call.cc:121 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, SUCCTYPE, const char*, const char*, int) [with ERRTYPE = cudnnStatus_t; bool THRW = true; SUCCTYPE = cudnnStatus_t; std::conditional_t<THRW, void, common::Status> = void] CUDNN failure 1001: CUDNN_STATUS_NOT_INITIALIZED ; GPU=0 ; hostname=graphics-ws ; file=/onnxruntime_src/onnxruntime/core/providers/cuda/cuda_execution_provider.cc ; line=232 ; expr=cudnnCreate(&cudnn_handle_); 

[ ...]

 - retrying with CPU + full opt
    13.4948 [darktable_ai] output[0] has dynamic dims — using ORT-allocated outputs
    13.4949 [restore] tile size 1024 (scale=1, need 1224MB, budget 1986MB)
    13.4949 [neural_restore] preview: tiled inference 349x311, tile=349
    13.4949 [restore] tiling 349x311 (scale=1) -> 349x311, 2x2 grid (4 tiles, T=349)