Siril 1.5 + starnet2_linux_2.5.4-0214_ORT_x64_cli + Ubuntu 26.04 + GPU

Siril

onnxruntime-linux-x64-gpu-1.26.0に含まれる、libonnxruntime.so.1.26.0を用いると
Starnet2-2.5.4がGPU (RTX5060) を使えます。

CUDA Toolkit 12.8.2 (April 2026)runfile + Ubuntu 26.04 + nvidia-driver 580 + python version 3.12.13 + PyTorch は、あらかじめインストールし動作するようにして下さい。

例えば、
https://globe3.ddns.net/wp/cudatoolkit-12-8-2runfile-ubuntu-2604-nvidiadriver580-python3-12-13-cosmic-clarity-suite-siril-15/

Open Neural Network Exchange (ONNX)
推論・学習高速化を行う実行エンジンを、GPU適応に置き換えて、GPU(ここではRTX5060)が動作するように設定します。

Windows 11 OS環境での、
Siril 1.5 + Windows 11 + starnet2_win_2.5.4-0214_ORT_x64_cli + RTX5060については、後述しています。

アップデートがありました。
2026-09-15 StarNet2 2.6.2 and DeepSNR 1.3.2 command-line release

starnet2_linux_2.5.4-0214_ORT_x64_cli を、
starnet2_linux_2.6.2-0241_ORT_x64_cli へアップデートできます。

starnet2_linux_2.6.2-0241 では以前に感じていた色調の違和感が無くなりました。有り難い。

StarNet.py

Siril へ StarNet.pyを導入する

[Set paths] で “starnet2” 及び “StarNet2_weights.onnx “を指定
[Run StarNet] → CPUが動作する。

Linear mode: applied MTF autostretch to the StarNet input.
Reading input from /tmp/siril_starnet_8mjx6poe/input.tif...
Color image is detected!
Image size: 3996x2721
Restoring neural network checkpoint...
Loading ONNX model from file: /usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/StarNet2_weights.onnx
Backend: ONNX Runtime (CPU execution provider) # ← CPUが動いている

GPUが動作するように、設定していきます。

weights.onnx, libonnxruntime

こちらを参考にします。
Method 1: System-wide NVIDIA installer setup
https://starnetastro.com/documentation/windows-cuda/

libonnxruntime.so.1 をlibonnxruntime.so.1.26.0に入れ替えます。
次の様にシンボリックリンクを用います。

ln -s libonnxruntime.so.1.26.0 libonnxruntime.so.1
ln -s libonnxruntime.so.1 libonnxruntime.so

lrwxrwxrwx 1  libonnxruntime.so@ -> libonnxruntime.so.1
lrwxrwxrwx 1  libonnxruntime.so.1@ -> libonnxruntime.so.1.26.0

libonnxruntime.so.1.26.0 を導入

then download and extract ONNX Runtime GPU 1.26.0 for Windows x64 from GitHub.
https://starnetastro.com/documentation/windows-cuda/

onnxruntime-linux-x64-gpu-1.26.0.tgzを導入します。

ONNX Runtime v1.27.0 は、
CUDA 12 packages are deprecated, please move to CUDA 13 ASAP.
CUDA 12 パッケージは非推奨となりました。できるだけ早く CUDA 13 へ移行してください。

ここではCUDA12を用いているので、1.27ではなく、1.26を導入します。

https://github.com/microsoft/onnxruntime/releases
onnxruntime-linux-x64-gpu-1.26.0.tgz をダウンロード、展開します。

onnxruntime-linux-x64-gpu-1.26.0/lib を確認
libonnxruntime.so.1.26.0
libonnxruntime_providers_cuda.so
libonnxruntime_providers_shared.so
libonnxruntime_providers_tensorrt.so #TensorRTを使わないので不要?

/usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/lib にある、
libonnxruntime.so.1 を別名にします。

sudo mv libonnxruntime.so.1 libonnxruntime.so.1.backup

/usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/libに、
libonnxruntime_providers_shared.so
があるならば、これも別名にします。

/usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/lib/ にある、 (2026,9,18 訂正)
onnxruntime-linux-x64-gpu-1.26.0/lib にある、
libonnxruntime.so.1.26.0
libonnxruntime_providers_cuda.so
libonnxruntime_providers_shared.so
libonnxruntime_providers_tensorrt.so
これらを、
/usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/lib へコピーします。

sudo cp libonnxruntime.so.1.26.0 /usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/lib/

下記のリンクを作ります。
libonnxruntime.so@ -> libonnxruntime.so.1
libonnxruntime.so.1@ -> libonnxruntime.so.1.26.0

sudo ln -s libonnxruntime.so.1.26.0 libonnxruntime.so.1
sudo ln -s libonnxruntime.so.1 libonnxruntime.so

deepsnr_linux_1.3.2-0147_ORT_x64_cli

deepsnr_linux_1.3.2-0147_ORT_x64_cli/README.txt, LICENSE.txt
本契約は、お客様とミキタ(ニキタ)・ミシウラ(以下「ライセンサー」という)との間で締結されるものです。

オプションのGPUアクセラレーション
同梱のONNX RuntimeファイルはCPUで実行されるため、GPUの設定は不要です。
NVIDIAに精通したユーザーは、同梱のONNX Runtimeファイルを互換性のあるONNX Runtime GPUランタイムに置き換え、必要なCUDA/cuDNNランタイムライブラリをダイナミックローダーから認識できるようにすることができます。CUDAの初期化に成功した場合、DeepSNRは次のように報告します:
バックエンド:ONNX Runtime (CUDA実行プロバイダー)
CUDAが利用できない、または不完全な場合、DeepSNRは同じ実行ファイルからCPU実行に切り替わります。手動でのGPUランタイムの変更により起動や処理に失敗した場合は、元のパッケージファイルを復元してください。

deepsnr_linux_1.3.2-0147_ORT_x64_cliも、上記 starnet2_linux_2.5.4-0214_ORT_x64_cli と同様にonnxruntime-linux-x64-gpu-1.26.0.tgzを用いてGPUが使えます。

環境変数を追加

1: cuda runtime, cudnn, torch 各ライブラリがあるディレクトリにパスを通します。

2: NVIDIA TensorRT(ディープラーニングの推論(予測・実行)を高速化するためのソフトウェア開発キット)が使えない場合でもCPU使用を禁止させる。処理できないならば、エラー表示で停止させる。

3: 使用する計算エンジンを列挙し指定する。CUDA GPU、NVIDIA GPU、仕方がないからCPUの順番

export LD_LIBRARY_PATH=/home/$USER/.local/share/siril/venv/lib/python3.12/site-packages/nvidia/cuda_runtime/lib:/home/$USER/.local/share/siril/venv/lib/python3.12/site-packages/nvidia/cudnn/lib:/home/$USER/.local/share/siril/venv/lib/python3.12/site-packages/torch/lib:$LD_LIBRARY_PATH

export ORT_TENSORRT_UNAVAILABLE_FALLBACK=0

export ONNXRUNTIME_PROVIDER_PRIORITY="CUDAExecutionProvider,TensorrtExecutionProvider,CPUExecutionProvider"

動作log

Linear mode: applied MTF autostretch to the StarNet input.
Reading input from /tmp/siril_starnet_qcse_6ma/input.tif...
Color image is detected!
Image size: 3996x2721
Restoring neural network checkpoint...
Loading ONNX model from file: /usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/StarNet2_weights.onnx
2026-08-11 19:21:51.880234368 [W:onnxruntime:, session_state.cc:1367 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2026-08-11 19:21:51.880253284 [W:onnxruntime:, session_state.cc:1369 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
Backend: ONNX Runtime (CUDA execution provider) # ← CUDA GPUが動いている
Working: Done!
Writing starless image to: /tmp/siril_starnet_qcse_6ma/starless.tif
Writing mask to: /tmp/siril_starnet_qcse_6ma/mask.tif
Saved Starmask to starnetmask_image.fit
StarNet finished.
# log
Linear mode: applied MTF autostretch to the StarNet input.
Reading input from /tmp/siril_starnet_tyv_jll2/input.tif...
Color image is detected!
Image size: 3008x3008
Restoring neural network checkpoint...
Loading ONNX model from file: /usr/local/share/starnet2_linux_2.5.4-0214_ORT_x64_cli/StarNet2_weights.onnx
2026-08-06 14:39:54.576734905 [W:onnxruntime:, session_state.cc:1367 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2026-08-06 14:39:54.576760112 [W:onnxruntime:, session_state.cc:1369 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
Backend: ONNX Runtime (CUDA execution provider) # ← GPUが動いている
Working: Done!
Writing starless image to: /tmp/siril_starnet_tyv_jll2/starless.tif
Writing mask to: /tmp/siril_starnet_tyv_jll2/mask.tif
Saved Starmask to starnetmask_image.fit
StarNet finished.

Windows11 と Starnet2

Windows での GPU アクセラレーションの設定手順
https://starnetastro.com/documentation/windows-cuda/

Use CUDA 12.x for the current ONNX Runtime 1.26.0 GPU path. Do not use CUDA 13.x runtime DLLs with the current CUDA-12 ONNX Runtime GPU DLLs.
現在の ONNX Runtime 1.26.0 の GPU パスでは、CUDA 12.x を使用してください。現在の CUDA-12 ONNX Runtime GPU DLL では、CUDA 13.x ランタイム DLL を使用しないでください。

こちらで (globe3.ddns.net) 確認された内容:

以下の設定は、この Windows 11, Siril 1.5 環境で確認しています:

オペレーティングシステム: Windows 11
GPU およびドライバー: NVIDIA GeForce RTX 5060、NVIDIA ドライバー 610.88 | WHQL
CUDA Toolkit: CUDA Toolkit 12.8.2 (April 2026). nvcc –version の出力は CUDA XX.x / VXX.x.x
cuDNN: CUDA 12.8 対応の cuDNN 9.24.0
ONNX Runtime GPU: Windows x64 対応の ONNX Runtime GPU 1.26.0

NVIDIAドライバー、CUDA Toolkit、およびcuDNNをインストールし、Windowsの$PATH変数を通じて、これらのランタイムライブラリをSirilから使えるようにします。
以下を参照します。

Method 1: System-wide NVIDIA installer setup
https://starnetastro.com/documentation/windows-cuda/

1. Install NVIDIA driver

2. Install CUDA Toolkit 12.8.2

where.exe nvcc

3. Install cuDNN 9.24.0

CUDA 13.x フォルダではなく、CUDA 12.9 cuDNN フォルダを使用してください。cuDNN インストーラによって、以下の CUDA 13.3 フォルダが作成される場合がありますが、この ONNX Runtime 1.26.0 CUDA-12 のセットアップでは使用しないでください:

4. Replace ONNX Runtime DLLs

ONNX Runtime GPU 1.26.0 for Windows x64 from GitHub.
onnxruntime-win-x64-gpu-1.26.0.zip をダウンロード、展開
https://github.com/microsoft/onnxruntime/releases/

onnxruntime.dll
ONNX Runtimeのメインエンジン。全ての計算命令を受け付けます。

onnxruntime_providers_cuda.dll
NVIDIAのCUDAを使って計算するための専用プラグインです。

onnxruntime_providers_shared.dll
メインエンジンと、CUDAプラグイン(および他のGPUプラグイン)との間で、データを仲介、共有するための共通ライブラリです。

StarNet2 CLI と、Python仮想環境下に3つのdllファイルをそれぞれ置きます。
 starnet++.exe がC++アプリとして直接GPUを使うため。
 StarNet.py スクリプトが、Pythonを用いてGPUを使うため。

C:\local\starnet2_win_2.5.3-0208_ORT
C:\Users\USERNAME\AppData\Local\siril\venv\Lib\site-packages\onnxruntime\backend

5. CUDA 12.8DLLを配置する

cublas64_12.dll 、 cudart64_12.dll (あれば cublasLt64_12.dll 、 cufft64_11.dll)を
C:\local\starnet2_win_2.5.3-0208_ORTディレクトリに置く。

### CUDA Toolkit 12.8 Update ディレクトリは以下
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin

ここからコピーします。

6. cudnn64_9.dll、cudnn_ops_infer64_9.dll、cudnn_cnn_infer64_9.dll を配置する

pythonコマンドを使って、それぞれのdllファイルをダウンロードします。
これはSiril 1.5仮想環境下ではなく、通常のPowerShell(またはターミナル)で行います。

python -m pip install --target "$env:TEMP\starnet-cuda-libs" "onnxruntime-gpu[cuda,cudnn]==1.26.0"

以下のファイルが starnet++.exe があるディレクトリに配置します。
ONNX 1.26 GPU版の3つ: onnxruntime.dll, onnxruntime_providers_shared.dll, onnxruntime_providers_cuda.dll

CUDA 12.8(システムからコピーしたもの): cublas64_12.dll, cudart64_12.dll

cuDNN 9(pythonを用いてダウンロード): cudnn64_9.dll(およびその他の cudnn_*.dll)


Windows11での StarNet2.py を使用し、GPUを動かす

Siril Pythonスクリプト、StarNet2.pyをSiril に導入し、GPUを使って画像処理を行う為の設定をします。

OS、ツール環境

Windows 11
RTX 5060(Blackwell / Compute Capability 12.0)
CUDA Toolkit 12.8
Python 3.12.13
StarNet2 2.5.4-0214 ORT x64 CLI

Windows11での設定手順

各種ファイルを確認します。

 nvidia-smi
Mon Aug 31 17:25:13 2026
+-----------------------------------------------------------------------------------------
| NVIDIA-SMI 616.56                 KMD Version: 616.56        CUDA UMD Version: 13.4     
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf        Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                       |                        |               MIG M. |
|=======================================+========================+======================|
|   0  NVIDIA GeForce RTX 5060 ...  WDDM  |   00000000:65:00.0 Off |                N/A |
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Fri_Feb_21_20:42:46_Pacific_Standard_Time_2025
Cuda compilation tools, release 12.8, V12.8.93
Build cuda_12.8.r12.8/compiler.35583870_0
where.exe nvcc
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin\nvcc.exe

cuDNN関連

where.exe cudnn64_9.dll
C:\Program Files\NVIDIA\CUDNN\v9.24\bin\12.9\x64\cudnn64_9.dll
where.exe cudnn_ops64_9.dll
C:\Program Files\NVIDIA\CUDNN\v9.24\bin\12.9\x64\cudnn_ops64_9.dll
where.exe cudnn_cnn64_9.dll
C:\Program Files\NVIDIA\CUDNN\v9.24\bin\12.9\x64\cudnn_cnn64_9.dll

starnet2_win_2.5.4-0214_ORT_x64_cli を眺める

starnet2_win_2.5.4-0214_ORT_x64_cli.zip
展開

StarNetに同梱されているONNX Runtimeのバージョンを確認します。

# powershell 
(Get-Item "C:\local\starnet2_win_2.5.4-0214_ORT_x64_cli\onnxruntime.dll").VersionInfo | Format-List FileVersion,ProductVersion


FileVersion    : 1.24.20260316.9.2d92497
ProductVersion : 1.24.20260316.9.2d92497

現在の環境
────────────────────────
RTX 5060
NVIDIA Driver 616.56
CUDA Toolkit 12.8
cuDNN 9.24 / CUDA 12.9

StarNet CUDA構成
────────────────────────
ONNX Runtime 1.26.0
CUDA 12.x
cuDNN 9.x

ONNX Runtime GPU 1.26.0 をstarnet2_win_2.5.4-0214_ORT_x64_cli へ導入

then download and extract ONNX Runtime GPU 1.26.0 for Windows x64 from GitHub.
https://starnetastro.com/documentation/windows-cuda/

onnxruntime-win-x64-gpu-1.26.0.zipを導入します。

onnxruntime-win-x64-gpu-1.26.0.zipを展開し、onnxruntime-win-x64-gpu-1.26.0\libにある次のファイルを、starnet2_win_2.5.4-0214_ORT_x64_cliへ配置します。

C:\local\starnet2_win_2.5.4-0214_ORT_x64_cli
│
├─ starnet2.exe
├─ StarNet2_weights.onnx
│
├─ onnxruntime.dll ← 1.26.0版に置換
├─ onnxruntime_providers_cuda.dll ← 新規
└─ onnxruntime_providers_shared.dll ← 1.26.0版に置換

### パス確認
where.exe cudnn_ops64_9.dll
C:\Program Files\NVIDIA\CUDNN\v9.24\bin\12.9\x64\cudnn_ops64_9.dll

where.exe cudnn_cnn64_9.dll
C:\Program Files\NVIDIA\CUDNN\v9.24\bin\12.9\x64\cudnn_cnn64_9.dll

where.exe cublas64_12.dll
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8\bin\cublas64_12.dll
Get-ChildItem "C:\local\starnet2_win_2.5.4-0214_ORT_x64_cli\" -Filter "onnxruntime*"
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        2026/08/31     19:15       15336248 onnxruntime.dll
-a----        2026/08/31     17:53           1094 ONNXRUNTIME_LICENSE.txt
-a----        2026/08/31     19:15      298998584 onnxruntime_providers_cuda.dll
-a----        2026/08/31     19:15          21816 onnxruntime_providers_shared.dll

Siril Pythonスクリプト StarNet.py から、starnet2_win_2.5.4-0214_ORT_x64_cliにある、
starnet2
StarNet2_weights.onnx
をそれぞれ指定します。

タスクマネージャーから、GPUの動作を確認します。

コメント