Offer SCUNet and NLM alongside the guided denoise

The AI denoise panel now picks between three bases: the existing guided
filter, non-local means and a learned SCUNet model run through
onnxruntime-node on overlapping tiles. The base is part of the render key, so
each model keeps its own cached render and switching back is instant, and jobs
report stage and tile progress instead of a bare spinner.

onnxruntime-node is pinned to 1.23.0, the last release that ships both macOS
architectures, and every Docker and desktop install skips its CUDA download
because only the CPU binaries in the package are used. The SCUNet weights and
ONNX Runtime are added to the third-party notices, the deb copyright file and
the README's denoise, API and redistribution sections.
This commit is contained in:
2026-12-01 04:03:53 +00:00
parent b34d34dacb
commit f7942d0bd0
26 changed files with 945 additions and 161 deletions
+5 -1
View File
@@ -333,11 +333,14 @@ function installDeps(appDir, archs, outDir) {
log('deps', `npm ci --omit=dev --os=darwin --cpu=${archs[0]} (sharp darwin-${archs[0]})`);
// sharp resolves its prebuilt binary through optionalDependencies, so npm can
// fetch the target architecture's package from any host.
// fetch the target architecture's package from any host. The ONNX skip keeps
// the postinstall from downloading the CUDA build; CPU binaries ship in the
// package.
run(
'npm',
['ci', '--omit=dev', '--os=darwin', `--cpu=${archs[0]}`, '--ignore-scripts', '--no-audit', '--no-fund'],
appDir,
{ ONNXRUNTIME_NODE_INSTALL: 'skip' },
);
rmSync(path.join(appDir, 'node_modules', '.bin'), { recursive: true, force: true });
@@ -353,6 +356,7 @@ function installDeps(appDir, archs, outDir) {
'npm',
['ci', '--omit=dev', '--os=darwin', `--cpu=${arch}`, '--ignore-scripts', '--no-audit', '--no-fund'],
side,
{ ONNXRUNTIME_NODE_INSTALL: 'skip' },
);
for (const pkg of [`@img/sharp-darwin-${arch}`, `@img/sharp-libvips-darwin-${arch}`]) {
const from = path.join(side, 'node_modules', pkg);