Steffenhir / GraXpert

GraXpert is an astronomical image processing program for extracting and removing gradients from the background of your astrophotos.
https://www.graxpert.com/
GNU General Public License v3.0
158 stars 16 forks source link

Problem with denoise model 3.0.0 #158

Closed guisaldanha closed 4 months ago

guisaldanha commented 4 months ago

Windows 11, 23H2. Graphics card: Intel Iris Xe Graphics Processor: 11th Gen Intel(R) Core(TM) i7-11390H RAM: 32,0 GB

I use GraXpert with the denoise model 2.0.0 and the Background Extraction model 1.0.1 without any problems.

Yesterday a friend had a problem downloading the 3.0.0 model of denoise and I tried to download and use it here at home and the same problem occurred. Apparently there were no errors when downloading the artificial intelligence model 3.0.0 (about 455Mb), but when denoise is being applied an error occurred. Below is the log:

2024-05-26 16:21:55,553 MainProcess root INFO     Progress: 99%
2024-05-26 16:21:55,959 MainProcess root INFO     Progress: 99%
2024-05-26 16:21:56,366 MainProcess root INFO     Progress: 99%
2024-05-26 16:21:56,571 MainProcess root INFO     Progress: 100%
2024-05-26 16:22:03,910 MainProcess root INFO     Starting denoising
2024-05-26 16:22:13,985 MainProcess root INFO     Available inference providers : ['DmlExecutionProvider', 'CPUExecutionProvider']
2024-05-26 16:22:13,986 MainProcess root INFO     Used inference providers : ['DmlExecutionProvider', 'CPUExecutionProvider']
2024-05-26 16:22:28,973 MainProcess root ERROR    
Traceback (most recent call last):
  File "D:\a\GraXpert\GraXpert\graxpert\application\app.py", line 350, in on_denoise_request
  File "D:\a\GraXpert\GraXpert\graxpert\denoising.py", line 118, in denoise
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 220, in run
onnxruntime.capi.onnxruntime_pybind11_state.Fail
2024-05-26 16:22:39,711 MainProcess root INFO     Starting denoising
2024-05-26 16:22:44,477 MainProcess root INFO     Available inference providers : ['DmlExecutionProvider', 'CPUExecutionProvider']
2024-05-26 16:22:44,478 MainProcess root INFO     Used inference providers : ['DmlExecutionProvider', 'CPUExecutionProvider']
2024-05-26 16:22:49,742 MainProcess root ERROR    
Traceback (most recent call last):
  File "D:\a\GraXpert\GraXpert\graxpert\application\app.py", line 350, in on_denoise_request
  File "D:\a\GraXpert\GraXpert\graxpert\denoising.py", line 118, in denoise
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 220, in run
onnxruntime.capi.onnxruntime_pybind11_state.Fail
2024-05-26 16:24:05,766 SpawnProcess-2 root INFO     stretch.stretch_channel started
2024-05-26 16:24:05,773 SpawnProcess-3 root INFO     stretch.stretch_channel started
2024-05-26 16:24:05,793 SpawnProcess-4 root INFO     stretch.stretch_channel started
2024-05-26 16:24:06,419 SpawnProcess-2 root INFO     stretch.stretch_channel finished
2024-05-26 16:24:06,450 SpawnProcess-4 root INFO     stretch.stretch_channel finished
2024-05-26 16:24:06,456 SpawnProcess-3 root INFO     stretch.stretch_channel finished
2024-05-26 16:24:08,892 MainProcess root INFO     Starting denoising
2024-05-26 16:24:13,757 MainProcess root INFO     Available inference providers : ['DmlExecutionProvider', 'CPUExecutionProvider']
2024-05-26 16:24:13,758 MainProcess root INFO     Used inference providers : ['DmlExecutionProvider', 'CPUExecutionProvider']
2024-05-26 16:24:19,519 MainProcess root ERROR    
Traceback (most recent call last):
  File "D:\a\GraXpert\GraXpert\graxpert\application\app.py", line 350, in on_denoise_request
  File "D:\a\GraXpert\GraXpert\graxpert\denoising.py", line 118, in denoise
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 220, in run
onnxruntime.capi.onnxruntime_pybind11_state.Fail
schmelly commented 4 months ago

Hi,

did you change the batch size parameter in GraXpert's advanced settings? If not, can you try a value of 1 please?

Many thanks and CS David

guisaldanha commented 4 months ago

Hi,

did you change the batch size parameter in GraXpert's advanced settings? If not, can you try a value of please?1

Many thanks and CS David

Worked perfectly. Thank you very much!

schmelly commented 4 months ago

Good to hear that! For a more in depth explanation: the batch size parameter controls how many tiles are send to the gpu in parallel (the input image is split into smaller tiles, each is processed individually, and then the output tiles are recombined again). The AI 3.0.0 model is more demanding on memory and I assume your available gpu memory was a bit on the low side for a higher batch size value.

CS, David

guisaldanha commented 4 months ago

Good to hear that! For a more in depth explanation: the batch size parameter controls how many tiles are send to the gpu in parallel (the input image is split into smaller tiles, each is processed individually, and then the output tiles are recombined again). The AI 3.0.0 model is more demanding on memory and I assume your available gpu memory was a bit on the low side for a higher batch size value.

CS, David

I understood. Thank you for the explanation. It's always better to know why things happen.