Siril Pythonスクリプト + GPU

これは、Siril Python スクリプトを用いて GPUユニットを使い、各種天体画像処理を行うメモです。
若しくは、Ubuntu から GPUユニットを扱えるようにする為のメモです。

Install ONNX Runtime

Install ONNX Runtime
https://onnxruntime.ai/docs/install/#python-installs

GPU(RTX 5060)が最新すぎて、アプリに内蔵されているPyTorchやCUDAバイナリが対応していない(sm_120の命令がない)

CosmicClaritySuite_Linux_AlternateBuild、Linux用のパッケージ(AlternateBuild)は通常、安定版の古いCUDA(例: 11.8や12.1など)を前提にビルドされているため、最新のBlackwellアーキテクチャである RTX 5060 上では、内蔵されているPythonスクリプトや実行バイナリがクラッシュするらしい。

Ubuntu 24.06 + nvidia-smi v580 + python version 3.12.13 +CUDA Toolkit 12.8.2 (April 2026) runfile

CosmicClaritySuite_Linux_AlternateBuild / SetiAstroCosmicClarity

“no kernel image is available for execution on this device”

GPUアーキテクチャが、インストールされているPyTorchやCUDAライブラリに対応していない。

PyTorchが古い。
PyTorchのビルドに含まれるGPUアーキテクチャバイナリが、使用中のGPUに合致していない。

Python 3.12 または 3.13 の仮想環境を作る

最新の PyTorch 夜間ビルド(Nightly / CUDA 12.8)の導入

# 既存の torch 関連を一度綺麗に削除
pip uninstall torch torchvision torchaudio -y

# CUDA 12.8 に対応したプレリリースの PyTorch パッケージを導入
pip install --pre torch torchvision torchaudio --index-url https://pytorch.org

RTX 50シリーズ向けに、CUDA 12.8 などに対応した PyTorch を明示的にインストール

# エラーコード
"no kernel image is available for execution on this device"

PyTorch 側のバイナリが RTX 5060(Blackwell 世代: sm_120)に対応していない。

インストールされている PyTorch(または関連ライブラリ)の CUDA バージョンが、お使いの GPU の世代(Compute Capability)をサポートしていない場合に発生します。GPU が新しすぎる(RTX 50シリーズなど)

RTX 50シリーズなどの新しい GPU を使う場合、CUDA 12.8 などに対応した PyTorch を明示的にインストールし直す。

pip3 uninstall torch torchvision torchaudio -y
pip3 install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

PyTorchを手動でアップグレード

Can not run Cosmic Clarity anymore
https://discuss.pixls.us/t/can-not-run-cosmic-clarity-anymore/55540

# CUDA版が12.8の場合:
pip3 install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
CUDA 13の場合:
pip3 install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
cd /home/$USER/.local/share/siril/venv
source ./bin/activate

パスと環境変数

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Cosmic Clarity コマンドラインで動かしてみる

Cosmic Clarity ディレクトリにある “input” ディレクトに、画像(FITS, TIFF, XISF, PNGなど)を置きます。

./SetiAstroCosmicClarity --sharpening_mode "Both" --stellar_amount 0.5 --nonstellar_strength 0.5
Legacy_CosmicClaritySuite_Linux$ ./SetiAstroCosmicClarity --sharpening_mode "Both" --stellar_amount 0.5 --nonstellar_strength 0.5

# log
[PYI-9789:ERROR] Failed to load Python shared library '/usr/local/share/Legacy_CosmicClaritySuite_Linux/_internal/libpython3.12.so': dlopen: /usr/local/share/Legacy_CosmicClaritySuite_Linux/_internal/libpython3.12.so: cannot open shared object file: No such file or directory

# libpython3.12.so
# /usr/local/share/CosmicClaritySuite_Linux_AlternateBuild/_internal/libpython3.12.so*
# /usr/local/share/Legacy_CosmicClaritySuite_Linux/_internal/ へコピー

# libpython3.12.so

CosmicClaritySuite_Linux_AlternateBuild
libpython3.12.so*
libpython3.12.so.1.0*

Legacy_CosmicClaritySuite_Linux
libpython3.8.so*
libpython3.8.so.1.0*

Cosmic Clarity Suite バージョンごとに 対応するPythonのバージョンが異なる。

CosmicClaritySuite_Linux_AlternateBuild
libpython3.12.so*
libpython3.12.so.1.0*

Python 3.12系 では、Siril Python スクリプトは完全に動かない経験があった。
Python 3.13.7 は過去に動いていた。
Python 3.13.14 を入れてみよう。

Ubuntu 26.04 + Python 3.13.14 + CUDA 12.x + Cosmic Clarity = Cheers🥂
かな?

Linux環境のノートPCにおいて、内蔵GPUを優先する「オンデマンド(PRIME Render Offload)」制限を解除し、常にNVIDIA-GPUを使用させる

# NVIDIA専用モードに切り替え(制限の解除)
sudo prime-select nvidia
# 設定を反映させるため再起動
sudo reboot
# 元に戻す(オンデマンド)場合は 
# sudo prime-select on-demand

CUDA Toolkit runfile

# CUDA Toolkit 12.8.2
wget https://developer.download.nvidia.com/compute/cuda/12.8.2/local_installers/cuda_12.8.2_570.211.01_linux.run
sudo sh cuda_12.8.2_570.211.01_linux.run --toolkit
# エラーログ
Deprecated feature: REMAKE_INITRD (/usr/src/nvidia-fs-2.24.3/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/nvidia-fs/2.24.3/source/dkms.conf)
Traceback (most recent call last):
  File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>
    import apport
ModuleNotFoundError: No module named 'apport'

Error! Bad return status for module build on kernel: 7.0.0-28-generic (x86_64)
Consult /var/lib/dkms/nvidia-fs/2.24.3/build/make.log for more information.
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/nvidia-fs/2.24.3/source/dkms.conf)
Traceback (most recent call last):
  File "/usr/share/apport/package-hooks/dkms_packages.py", line 22, in <module>
    import apport
ModuleNotFoundError: No module named 'apport'

Error! Bad return status for module build on kernel: 7.0.0-28-generic (x86_64)
Consult /var/lib/dkms/nvidia-fs/2.24.3/build/make.log for more information.
modprobe: FATAL: Module nvidia-fs not found in directory /lib/modules/7.0.0-28-generic
 Installation failed. See log at /var/log/cuda-installer.log for details.

# エラーログ
# ModuleNotFoundError: No module named 'apport'
sudo apt update
sudo apt install python3-pip
sudo apt install python3-apport

nvidia-fs と mofed

「nvidia-fs をインストールするには、mofedを先にインストールしなさいよ」とインストールログ

# CUDA Toolkit 12.8.2
wget https://developer.download.nvidia.com/compute/cuda/12.8.2/local_installers/cuda_12.8.2_570.211.01_linux.run
sudo sh cuda_12.8.2_570.211.01_linux.run --toolkit
# インストールログ
[INFO]: previous version of nvidia-fs is not installed, nvidia-fs version: 2.24.3 will be installed.
[INFO]: getting mofed Status
[INFO]: installation status shows that mofed is not installed,please install mofed before continuing nvidia_fs install.
[ERROR]: Install of nvidia-fs failed, quitting

nvidia-fs とは、
https://jp.ubuntu.com/blog/canonical-announces-it-will-distribute-nvidia-doca-ofed-in-ubuntu-jp

RDMA(リモートダイレクトメモリアクセス)やNVIDIA GPUDirectといった高度な機能により、CPUのオフロード、テールレイテンシの短縮と予測、負荷時におけるスループットの維持を実現します。

NVIDIA GPUDirect とは、
https://developer.nvidia.com/gpudirect

システムメモリを介さずに、NVMeやNVMe over Fabric(NVMe-oF)などのローカルまたはリモートストレージと、GPUメモリとの間に、直接的なデータパスを実現します。

Canonical、UbuntuでのNVIDIA DOCA-OFEDの配布を発表 by Canonical on 21 April 2026
https://jp.ubuntu.com/blog/canonical-announces-it-will-distribute-nvidia-doca-ofed-in-ubuntu-jp

インストール
Install and maintain DOCA-OFED
https://ubuntu.com/server/docs/how-to/networking/install-doca-ofed/

# インストール
uname -r
sudo add-apt-repository ppa:canonical-nvidia/doca-stable
sudo apt update
sudo apt install doca-ofed-<your_kernel_flavor>
## もしも、uname -r -> 7.0.0-28-generic などならば、以下
sudo apt install doca-ofed-generic
Finally, reboot the machine.!!

OSの再起動をお忘れなく
複数のGPUユニットがある場合などに、有効でしょう。

# インストールログ
Installing: doca-ofed-generic

Installing dependencies: doca-ofed-userspace-26.01  ibsim-doc-26.01  libibmad5-26.01 libnl-3-dev  linux-main-modules-doca-ofed-26.01-7.0.0-28-generic  mlnx-iproute2-26.01
opensm-doc-26.01  ucx-26.01

dpcp-26.01  ibutils2-26.01  libibnetdisc5-26.01 libnl-route-3-dev linux-modules-doca-ofed-26.01-generic
mlnx-ofed-kernel-utils-26.01  perftest-26.01

ibacm-26.01  ibverbs-providers-26.01  libibumad-dev-26.01   libopensm-26.01
mft-26.01    mlnx-tools-26.01    rdma-core-26.01

ibarr-26.01  ibverbs-utils-26.01  libibumad3-26.01  libopensm-devel-26.01
mft-mlx5-26.01    ofed-scripts-26.01   rdmacm-utils-26.01

ibdump-26.01 infiniband-diags-26.01 libibverbs-dev-26.01  librdmacm-dev-26.01
mft-nvredfish-26.01    openmpi-26.01  rshim-26.01

ibsim-26.01  libibmad-dev-26.01  libibverbs1-26.01  librdmacm1-26.01  mlnx-ethtool-26.01
opensm-26.01    srptools-26.01
DOCA-OFED をアップグレード
apt list --upgradable
sudo apt update && sudo apt full-upgrade

PyTorchでGPU情報を確認

Siril で “Script Editer” を表示させます。
ソースを入力したら、[Script] → [run]

PyTorchのバージョン

import torch

print(torch.__version__)
2.13.0+cu130

PyTorchでGPUが使用可能かを確認

import torch

print(torch.cuda.is_available())
True

GPU Framework Manager

WWW
https://siril.readthedocs.io/en/latest/Python-API.html#sirilpy-gpu-helpers

このサブモジュールは、SirilのPythonスクリプトで使用するためのONNXやTorchなどのGPUフレームワークパッケージの管理を容易にするヘルパークラスを提供します。これらのフレームワークによる、さまざまなOS上の異なるGPUアーキテクチャへの対応状況は急速に変化しており、本ヘルパークラスは信頼性の高いパッケージや設定を提案することを目的としています。つまり、提案される設定は場合によっては保守的になる可能性があります。その目的は、絶対的に最良ではあるが不安定になりがちな最適化ではなく、自動化されたPython環境において、できるだけ多くのユーザーに良好かつ堅牢なレベルのGPUサポートを提供することにあります。

Siril Pythonインターフェース用のGPUヘルパーモジュールで、GPU関連モジュールの検出、インストール、およびテストを行うためのヘルパー関数を提供します。当初の対象範囲はONNX、Torch、およびJAXです。

Manage ONNX Runtime, PyTorch, and JAX installations

ONNX Runtime: Open Neural Network Exchange

============================================================
Uninstalling ONNX Runtime...
platformdirs is installed
onnx is installed
Found onnxruntime packages: onnxruntime-gpu
Uninstalling onnxruntime-gpu...
Found existing installation: onnxruntime-gpu 1.27.0
Uninstalling onnxruntime-gpu-1.27.0:
  Successfully uninstalled onnxruntime-gpu-1.27.0
Successfully uninstalled onnxruntime-gpu
✓ Uninstalled packages: onnxruntime-gpu

============================================================
Installing recommended ONNX Runtime configuration...
Package: onnxruntime-gpu
Backend: gpu
platformdirs is installed
onnx is installed
Running installer...
Installing onnxruntime-gpu. This may take a few seconds...
Collecting onnxruntime-gpu
  Using cached onnxruntime_gpu-1.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (5.7 kB)
Requirement already satisfied: flatbuffers in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (25.12.19)
Requirement already satisfied: numpy>=1.21.6 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (2.5.1)
Requirement already satisfied: packaging in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (26.2)
Requirement already satisfied: protobuf>=4.25.8 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (7.35.1)
Using cached onnxruntime_gpu-1.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (220.3 MB)
Installing collected packages: onnxruntime-gpu
Successfully installed onnxruntime-gpu-1.27.0
Successfully installed onnxruntime-gpu
✓ Installation completed
Running post-installation tests...

============================================================
Running ONNX Runtime tests...
platformdirs is installed
onnx is installed
Available providers: TensorrtExecutionProvider, CUDAExecutionProvider, CPUExecutionProvider
=== ONNX Execution Provider Tester ===
Creating ONNX model...
Model saved to temporary file: /tmp/tmp03n29ppm.onnx
Running reference on CPU...
OK: CPU output computed.
Available execution providers:
  - TensorrtExecutionProvider
  - CUDAExecutionProvider
  - CPUExecutionProvider
Testing each provider without fallback...
Testing TensorrtExecutionProvider...
*************** EP Error ***************
EP Error /onnxruntime_src/onnxruntime/python/onnxruntime_pybind_state.cc:534 void onnxruntime::python::RegisterTensorRTPluginsAsCustomOps(PySessionOptions&, const onnxruntime::ProviderOptions&) Please install TensorRT libraries as mentioned in the GPU requirements page, make sure they're in the PATH or LD_LIBRARY_PATH, and that your GPU is supported.
 when using ['TensorrtExecutionProvider']
Falling back to ['CPUExecutionProvider'] and retrying.
****************************************
(x) TensorrtExecutionProvider: fallback occurred (used CPUExecutionProvider)
Testing CUDAExecutionProvider...
OK: CUDAExecutionProvider ran successfully
Testing CPUExecutionProvider...
OK: CPUExecutionProvider ran successfully
=== Summary ===
OK: Working providers (in priority order):
  - CUDAExecutionProvider
  - CPUExecutionProvider
→ Best available provider: CUDAExecutionProvider
Cached execution providers to /home/minmin/.config/siril/siril_onnx.conf
✓ Tests passed! Working providers: CUDAExecutionProvider, CPUExecutionProvider

GPU Framework Manager , ONNX Runtime インストーラーの不備

ONNX Runtime インストーラーに不備があるならば、pipを用いてインストールしてみよう。

source /home/USERNAME/.local/share/siril/venv/bin/activate

(venv) USERNAME@LOCAL:~$ which python
/home/USERNAME/.local/share/siril/venv/bin/python

(venv) USERNAME@LOCAL:~$ python3.14 -m pip uninstall onnxruntime onnxruntime-gpu

(venv) USErNAME@LOCAL:~$ python3.14 -m pip install onnxruntime-gpu
Collecting onnxruntime-gpu
  Using cached onnxruntime_gpu-1.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (5.7 kB)
Requirement already satisfied: flatbuffers in ./.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (25.12.19)
Requirement already satisfied: numpy>=1.21.6 in ./.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (2.5.1)
Requirement already satisfied: packaging in ./.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (26.2)
Requirement already satisfied: protobuf>=4.25.8 in ./.local/share/siril/venv/lib/python3.14/site-packages (from onnxruntime-gpu) (7.35.1)
Using cached onnxruntime_gpu-1.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (220.3 MB)
Installing collected packages: onnxruntime-gpu
Successfully installed onnxruntime-gpu-1.27.0

onnxruntime(CPU)

onnxruntime-directml(DirectML – Windows)

onnxruntime-gpu(NVIDIA CUDA)

PyTorch:

import sirilpy as s
oh = s.ONNXHelper()
oh.uninstall_onnxruntime()
s.ensure_installed("onnxruntime")
============================================================
Uninstalling PyTorch...
Found torch packages: torch, torchvision
Uninstalling torch...
Found existing installation: torch 2.13.0+cu130
Uninstalling torch-2.13.0+cu130:
  Successfully uninstalled torch-2.13.0+cu130
Successfully uninstalled torch
Uninstalling torchvision...
Found existing installation: torchvision 0.28.0+cu130
Uninstalling torchvision-0.28.0+cu130:
  Successfully uninstalled torchvision-0.28.0+cu130
Successfully uninstalled torchvision
✓ Uninstalled packages: torch, torchvision

============================================================
Installing recommended PyTorch configuration...
Backend: cuda
CUDA version: cu128
Running installer...
Installing: torch torchvision
Looking in indexes: https://download.pytorch.org/whl/cu128
Collecting torch
  Using cached torch-2.11.0%2Bcu128-cp314-cp314-manylinux_2_28_x86_64.whl.metadata (29 kB)
Collecting torchvision
  Using cached torchvision-0.26.0%2Bcu128-cp314-cp314-manylinux_2_28_x86_64.whl.metadata (5.5 kB)
Requirement already satisfied: filelock in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (3.29.0)
Requirement already satisfied: typing-extensions>=4.10.0 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (4.16.0)
Requirement already satisfied: setuptools<82 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (78.1.0)
Requirement already satisfied: sympy>=1.13.3 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (1.14.0)
Requirement already satisfied: networkx>=2.5.1 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (3.6.1)
Requirement already satisfied: jinja2 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (3.1.6)
Requirement already satisfied: fsspec>=0.8.5 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (2026.4.0)
Collecting cuda-toolkit==12.8.1 (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch)
  Downloading cuda_toolkit-12.8.1-py2.py3-none-any.whl (2.3 kB)
Collecting cuda-bindings<13,>=12.9.4 (from torch)
  Using cached cuda_bindings-12.9.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata (2.6 kB)
Requirement already satisfied: nvidia-cudnn-cu12==9.19.0.56 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (9.19.0.56)
Requirement already satisfied: nvidia-cusparselt-cu12==0.7.1 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (0.7.1)
Requirement already satisfied: nvidia-nccl-cu12==2.28.9 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (2.28.9)
Requirement already satisfied: nvidia-nvshmem-cu12==3.4.5 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torch) (3.4.5)
Collecting triton==3.6.0 (from torch)
  Using cached triton-3.6.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (1.7 kB)
Requirement already satisfied: nvidia-cublas-cu12==12.8.4.1.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.8.4.1)
Requirement already satisfied: nvidia-cuda-runtime-cu12==12.8.90.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.8.90)
Requirement already satisfied: nvidia-cufft-cu12==11.3.3.83.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (11.3.3.83)
Requirement already satisfied: nvidia-cufile-cu12==1.13.1.3.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (1.13.1.3)
Requirement already satisfied: nvidia-cuda-cupti-cu12==12.8.90.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.8.90)
Requirement already satisfied: nvidia-curand-cu12==10.3.9.90.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (10.3.9.90)
Requirement already satisfied: nvidia-cusolver-cu12==11.7.3.90.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (11.7.3.90)
Requirement already satisfied: nvidia-cusparse-cu12==12.5.8.93.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.5.8.93)
Requirement already satisfied: nvidia-nvjitlink-cu12==12.8.93.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.8.93)
Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.8.93.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.8.93)
Requirement already satisfied: nvidia-nvtx-cu12==12.8.90.* in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-toolkit[cublas,cudart,cufft,cufile,cupti,curand,cusolver,cusparse,nvjitlink,nvrtc,nvtx]==12.8.1; platform_system == "Linux"->torch) (12.8.90)
Requirement already satisfied: cuda-pathfinder~=1.1 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from cuda-bindings<13,>=12.9.4->torch) (1.2.2)
Requirement already satisfied: numpy in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torchvision) (2.5.1)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from torchvision) (12.2.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from sympy>=1.13.3->torch) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in /home/minmin/.local/share/siril/venv/lib/python3.14/site-packages (from jinja2->torch) (3.0.3)
Using cached torch-2.11.0%2Bcu128-cp314-cp314-manylinux_2_28_x86_64.whl (820.3 MB)
Using cached triton-3.6.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (188.3 MB)
Using cached cuda_bindings-12.9.4-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (11.9 MB)
Using cached torchvision-0.26.0%2Bcu128-cp314-cp314-manylinux_2_28_x86_64.whl (8.1 MB)
Installing collected packages: cuda-toolkit, triton, cuda-bindings, torch, torchvision
  Attempting uninstall: cuda-toolkit
    Found existing installation: cuda-toolkit 13.0.3.0
    Uninstalling cuda-toolkit-13.0.3.0:
      Successfully uninstalled cuda-toolkit-13.0.3.0
  Attempting uninstall: triton
    Found existing installation: triton 3.7.1
    Uninstalling triton-3.7.1:
      Successfully uninstalled triton-3.7.1
  Attempting uninstall: cuda-bindings
    Found existing installation: cuda-bindings 13.0.3
    Uninstalling cuda-bindings-13.0.3:
      Successfully uninstalled cuda-bindings-13.0.3
Successfully installed cuda-bindings-12.9.4 cuda-toolkit-12.8.1 torch-2.11.0+cu128 torchvision-0.26.0+cu128 triton-3.6.0
PyTorch installation completed successfully
✓ PyTorch installation completed
Running post-installation tests...

============================================================
Running PyTorch tests...
Torch is already installed
=== PyTorch GPU Test ===
OK: PyTorch 2.11.0+cu128 imported successfully!
=== Device Information ===
PyTorch version: 2.11.0+cu128
CUDA available: True
CUDA version: 12.8
GPU count: 1
  GPU 0: NVIDIA GeForce RTX 5060 Laptop GPU
Creating model and test data...
Model parameters: 459,904
Input shape: torch.Size([64, 256])
Testing CPU execution (for accuracy reference)...
Using CUDA (NVidia / AMD)
Testing GPU execution...
OK: GPU execution successful!
OK: CPU and GPU outputs match within tolerance!
==================================================
=== Tensor Operations Test ===
OK: PyTorch 2.11.0+cu128 imported successfully!
Creating 2048x2048 tensors...
OK: Results match within tolerance!
CPU time: 0.0446s
GPU time: 0.0050s
Speedup: 8.90x
==================================================
✓ All PyTorch tests passed!
============================================================
Uninstalling PyTorch...
Found torch packages: torch, torchvision
Uninstalling torch...
Found existing installation: torch 2.11.0+cu128
Uninstalling torch-2.11.0+cu128:
  Successfully uninstalled torch-2.11.0+cu128
Successfully uninstalled torch
Uninstalling torchvision...
Found existing installation: torchvision 0.26.0+cu128
Uninstalling torchvision-0.26.0+cu128:
  Successfully uninstalled torchvision-0.26.0+cu128
Successfully uninstalled torchvision
✓ Uninstalled packages: torch, torchvision

============================================================
Manually installing torch+cu130 (CUDA 13.0 - GTX 16xx-RTX 50xx)...
Uninstalling existing PyTorch packages...
No torch packages found.
Installing torch+cu130 (CUDA 13.0 - GTX 16xx-RTX 50xx)...
Installing: torch torchvision
Looking in indexes: https://download.pytorch.org/whl/cu130
Collecting torch
  Downloading torch-2.13.0%2Bcu130-cp313-cp313-win_amd64.whl.metadata (39 kB)
Collecting torchvision
  Downloading torchvision-0.28.0%2Bcu130-cp313-cp313-win_amd64.whl.metadata (5.7 kB)
Requirement already satisfied: filelock in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (3.29.0)
Requirement already satisfied: typing-extensions>=4.10.0 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (4.16.0)
Requirement already satisfied: setuptools>=77.0.3 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (78.1.0)
Requirement already satisfied: sympy>=1.13.3 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (1.14.0)
Requirement already satisfied: networkx>=2.5.1 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (3.6.1)
Requirement already satisfied: jinja2 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (3.1.6)
Requirement already satisfied: fsspec>=0.8.5 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torch) (2026.4.0)
Requirement already satisfied: numpy in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torchvision) (2.5.1)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from torchvision) (12.2.0)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from sympy>=1.13.3->torch) (1.3.0)
Requirement already satisfied: MarkupSafe>=2.0 in C:\Users\minmin\AppData\Local\siril\venv\Lib\site-packages (from jinja2->torch) (3.0.3)
Downloading torch-2.13.0%2Bcu130-cp313-cp313-win_amd64.whl (1915.5 MB)
   ---------------------------------------- 1.9/1.9 GB 10.3 MB/s  0:02:49
Downloading torchvision-0.28.0%2Bcu130-cp313-cp313-win_amd64.whl (9.2 MB)
   ---------------------------------------- 9.2/9.2 MB 11.5 MB/s  0:00:00
Installing collected packages: torch, torchvision
Successfully installed torch-2.13.0+cu130 torchvision-0.28.0+cu130
PyTorch installation completed successfully
✓ Successfully installed torch+cu130 (CUDA 13.0 - GTX 16xx-RTX 50xx)
Running post-installation tests...

============================================================
Running PyTorch tests...
Torch is already installed
=== PyTorch GPU Test ===
OK: PyTorch 2.13.0+cu130 imported successfully!
=== Device Information ===
PyTorch version: 2.13.0+cu130
CUDA available: True
CUDA version: 13.0
GPU count: 1
  GPU 0: NVIDIA GeForce RTX 5060 Laptop GPU
Creating model and test data...
Model parameters: 459,904
Input shape: torch.Size([64, 256])
Testing CPU execution (for accuracy reference)...
Using CUDA (NVidia / AMD)
Testing GPU execution...
OK: GPU execution successful!
OK: CPU and GPU outputs match within tolerance!
==================================================
=== Tensor Operations Test ===
OK: PyTorch 2.13.0+cu130 imported successfully!
Creating 2048x2048 tensors...
OK: Results match within tolerance!
CPU time: 0.0283s
GPU time: 0.0031s
Speedup: 9.09x
==================================================
✓ All PyTorch tests passed!

インストールパッケージ

Installing collected packages: 
nvidia-cusparselt-cu12, mpmath, cuda-toolkit, triton, sympy, setuptools, pillow, nvidia-nvtx-cu12, nvidia-nvshmem-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufile-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, networkx, MarkupSafe, fsspec, filelock, cuda-pathfinder, nvidia-cusparse-cu12, nvidia-cufft-cu12, nvidia-cudnn-cu12, jinja2, cuda-bindings, nvidia-cusolver-cu12, torch, torchvision

JAX :

GraXpart と GPU

Collecting platformdirs
  Downloading platformdirs-4.11.0-py3-none-any.whl.metadata (5.5 kB)

Collecting onnx
  Downloading onnx-1.22.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.5 kB)

Collecting protobuf>=4.25.1 (from onnx)
  Downloading protobuf-7.35.1-cp310-abi3-manylinux2014_x86_64.whl.metadata (595 bytes)

Collecting typing_extensions>=4.15.0 (from onnx)
  Downloading typing_extensions-4.16.0-py3-none-any.whl.metadata (3.3 kB)

Collecting ml_dtypes>=0.5.4 (from onnx)
  Downloading ml_dtypes-0.5.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.9 kB)

Downloading onnx-1.22.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (19.1 MB)

Downloading ml_dtypes-0.5.4-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (5.0 MB)

Downloading protobuf-7.35.1-cp310-abi3-manylinux2014_x86_64.whl (327 kB)

Downloading typing_extensions-4.16.0-py3-none-any.whl (45 kB)

Collecting onnxruntime-gpu
  Downloading onnxruntime_gpu-1.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (5.7 kB)

Collecting flatbuffers (from onnxruntime-gpu)
  Downloading flatbuffers-25.12.19-py2.py3-none-any.whl.metadata (1.0 kB)

Downloading onnxruntime_gpu-1.27.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (220.3 MB)

GPU セット順番?

GraXpert pythonスクリプトを動かすと、Collecting onnxruntime-gpu項目でダウンロード、インストールされる。

GPU Framework Manager内のTestでOKとなる。

GPU Framework Managerでonnxruntime-gpuをインストールできるのか?

Cosmic Clarityが動くのか?

Auto Gradient Removal

  • Scale:
  • Smoothness:

Linux GPU Control Application

おまけのアプリケーション

WWW
https://github.com/ilya-zlobintsev/LACT

Ubuntu 26.04 へインストールします。

wget https://github.com/ilya-zlobintsev/LACT/releases/download/v0.8.4/lact-0.9.1-0.amd64.ubuntu-2604.deb
sudo apt install ./lact-0.8.4-0.amd64.ubuntu-2404.deb
sudo systemctl enable --now lactd

コメント