Thank you for your hard work. First of all, a small typo in “Install requirements” section. There is the double quotes in wrong position. It should be
```
uv add -r requirements.in --index "https://download.pytorch.org/whl/xpu**"** --upgrade
```
Unfortunately nothing changed for me. If I follow the readme step by step and launch denoise.py I still get the “XPU device count is zero” error:
~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/xpu/__init__.py:60: UserWarning: XPU device count is zero! (Triggered internally at /pytorch/c10/xpu/XPUFunctions.cpp:115.)
return torch._C._xpu_getDeviceCount()
cs and/or ucs not set, using defaults ...
cs=504, ucs=480
warning: PyTorch does not have access to an accelerator (means no gpu found probably). Defaulting to CPU.
Traceback (most recent call last):
File "~/Apps/nind-denoise/src/nind_denoise/denoise_image.py", line 226, in <module>
model = nn_common.Model.instantiate_model(network=args.g_network, model_path=args.model_path,
strparameters=args.model_parameters, keyword='generator',
device=device, models_dpath=args.models_dpath)
File "~/Apps/nind-denoise/src/nind_denoise/nn_common.py", line 132, in instantiate_model
model.load_state_dict(torch.load(path, map_location=device))
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 1521, in load
return _load(
opened_zipfile,
...<3 lines>...
**pickle_load_args,
)
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 2119, in _load
result = unpickler.load()
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/_weights_only_unpickler.py", line 532, in load
self.append(self.persistent_load(pid))
~~~~~~~~~~~~~~~~~~~~^^^^^
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 2083, in persistent_load
typed_storage = load_tensor(
dtype, nbytes, key, _maybe_decode_ascii(location)
)
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 2049, in load_tensor
wrap_storage = restore_location(storage, location)
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 1864, in restore_location
return default_restore_location(storage, str(map_location))
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 698, in default_restore_location
result = fn(storage, location)
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 636, in _deserialize
device = _validate_device(location, backend_name)
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/serialization.py", line 605, in _validate_device
raise RuntimeError(
...<5 lines>...
)
RuntimeError: Attempting to deserialize object on a XPU device but torch.xpu.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Error: denoised image not found: ~/Immagini/Foto/2025/08/creta/20250810_0005_s1_denoised.tiff
Traceback (most recent call last):
File "~/Apps/nind-denoise/src/denoise.py", line 217, in <module>
raise Exception
Exception
If I source “/opt/intel/oneapi/setvars.sh” before running script I get this:
:: initializing oneAPI environment ...
bash: BASH_VERSION = 5.2.21(1)-release
args: Using "$@" for setvars.sh arguments:
:: advisor -- latest
:: ccl -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: ipp -- latest
:: ippcp -- latest
:: mkl -- latest
:: mpi -- latest
:: pti -- latest
:: tbb -- latest
:: umf -- latest
:: vtune -- latest
:: oneAPI environment initialized ::
python3 ~/Apps/nind-denoise/src/denoise.py -q 99 ~/Immagini/Foto/2025/08/creta/20250810_0005.NEF
Traceback (most recent call last):
File "~/Apps/nind-denoise/src/denoise.py", line 34, in <module>
import torch.hub
File "~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/__init__.py", line 416, in <module>
from torch._C import * # noqa: F403
^^^^^^^^^^^^^^^^^^^^^^
ImportError: /opt/intel/oneapi/compiler/2025.2/lib/libur_loader.so.0: version `LIBUR_LOADER_0.11' not found (required by ~/Apps/nind-denoise/.venv/lib/python3.13/site-packages/torch/lib/../../../../libsycl.so.8)
This is my versions:
(nind-denoise) alessandro@arrakeen:~/Apps/nind-denoise$ python3 --version
Python 3.13.7
(nind-denoise) alessandro@arrakeen:~/Apps/nind-denoise$ uv pip list
Package Version
----------------------- ----------
asttokens 3.0.0
beautifulsoup4 4.13.4
bs4 0.0.2
configargparse 1.7.1
decorator 5.2.1
docopt 0.6.2
dpcpp-cpp-rt 2025.1.1
executing 2.2.0
exiv2 0.17.3
filelock 3.13.1
fsspec 2024.6.1
imageio 2.37.0
impi-rt 2021.15.0
intel-cmplr-lib-rt 2025.1.1
intel-cmplr-lib-ur 2025.1.1
intel-cmplr-lic-rt 2025.1.1
intel-opencl-rt 2025.1.1
intel-openmp 2025.1.1
intel-pti 0.12.3
intel-sycl-rt 2025.1.1
ipython 9.4.0
ipython-pygments-lexers 1.1.1
jedi 0.19.2
jinja2 3.1.4
lxml 6.0.0
markupsafe 2.1.5
matplotlib-inline 0.1.7
mkl 2025.1.0
mpmath 1.3.0
networkx 3.3
numpy 2.1.2
oneccl 2021.15.2
oneccl-devel 2021.15.2
onemkl-sycl-blas 2025.1.0
onemkl-sycl-dft 2025.1.0
onemkl-sycl-lapack 2025.1.0
onemkl-sycl-rng 2025.1.0
onemkl-sycl-sparse 2025.1.0
opencv-contrib-python 4.12.0.88
opencv-python 4.12.0.88
ostools 1.1.8
parso 0.8.4
path 17.1.0
pexpect 4.9.0
pillow 11.0.0
pip 25.2
piqa 1.3.2
prompt-toolkit 3.0.51
ptyprocess 0.7.0
pure-eval 0.2.3
pygments 2.19.2
pytorch-triton-xpu 3.4.0
pyyaml 6.0.2
setuptools 70.2.0
soupsieve 2.7
stack-data 0.6.3
sympy 1.13.3
tbb 2022.1.0
tcmlib 1.3.0
tifffile 2025.6.11
torch 2.8.0+xpu
torchaudio 2.8.0+xpu
torchvision 0.23.0+xpu
traitlets 5.14.3
typing-extensions 4.12.2
umf 0.10.0
wcwidth 0.2.13





