Main
Siril guide

For Windows only =)

StarNet++ is an extremely convenient and useful thing, however, in its original form, it uses only the CPU and is very slow. For regular images that have not been drizzled, waiting a minute is most likely not a big problem. However, if you need to process a comet, or a full frame 3x drizzled image, the time can increase by orders of magnitude.

As a test of the speed of StarNet++ I will use an image with a resolution of 11072x7392: Test
6 minutes and 29 seconds. Long enough. What about resource consumption? Test
Almost 80% of CPU usage on AMD 5 5600H.

It becomes obvious that it takes a lot of time to process large images and the CPU is highly loaded. Since StarNet++ is a neural network in which many matrix calculations need to be performed, they can be significantly accelerated using CUDA cores.

First of all, it's worth checking if your GPU supports CUDA computing.
There is some possibility that the GPU is not on the list, but it supports CUDA. Some googling will help.

The next step is to update the GPU drivers.

Installing the CUDA SDK:
The most important part is installing the necessary CUDA components from NVIDIA. For tensorflow (the library in which StarNet++ is written) to work correctly, CUDA version 11.2 is required.
Installing CUDA requires about 6 gigabytes of free space.

After running the installer and system check, an error may occur due to the fact that CUDA is already installed.
Already installed

To fix this, you need to uninstall all applications related to CUDA through the Windows utility "Add or remove programs":
Programs Programs

The next step is to select custom options:
Options

Uncheck these two parameters:
Uncheck

Sometimes an error may occur:
Error
To fix it, go back to the installer and uncheck these parameters. To see them, you need to click on CUDA dropdown:
Error
After that, CUDA should be installed successfully: Error

Adding libraries:
In order for CUDA to work with StarNet++, you need to add the appropriate libraries to the right places.
You need to download the cuDNN 8.1 library. To do this, you need to register an NVIDIA account, if you don't have one yet.
CUDNN
As well as tensorflow library, which supports GPU acceleration.
Now you need to open the environmental variables so that the system can use CUDA, as well as for an additional flag.
Flag

Variable

You need to check if CUDA has created its own variables:
CUDA

You also need to create a separate variable:
Variable

TF_FORCE_GPU_ALLOW_GROWTH with a variable value true
Variable

Be sure to press OK on each step!
Replace

CUDA is located in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2 folder

Copy libtensorflow\include\tensorflow folder to CUDA\v11.2\include folder
Replace

Copy libtensorflow\lib\tensorflow.lib file to CUDA\v11.2\lib folder
Replace

Copy all files from cudnn\cuda\bin folder to CUDA\v11.2\bin folder
Replace

Copy all files from cudnn\cuda\include folder to CUDA\v11.2\include folder
Replace

Replace starnet++_cli\tensorflow.dll with libtensorflow\lib\tensorflow.dll Replace

Restart the computer.

Has it produced any results? Definitely!
Result

And also faster!
Result


Contributors:
careless25, Lazulkat