Error computing NN outputs, strange patches of random pixels, or PixInsight crashing on MacOS

When running BlurXTerminator, NoiseXTerminator, or StarXTerminator on MacOS, in rare cases you might see the following error message:

*** Error: In ProcessTile Error computing NN outputs.

In some cases, the tool will run with no errors, but will produce patches of random pixels scattered around the image. In other cases, PixInsight may simply crash.

Update (11 October 2023): It appears that this is due to a MacOS bug that may have been corrected in MacOS 14 (Sonoma). Try upgrading your Mac to this version of MacOS.

We’re currently working diligently to find the root cause of this obscure malfunction that only affects some Apple silicon Macs. In the meantime, there is fortunately a workaround. This will not actually correct the underlying issue, but will allow BlurXTerminator, StarXTerminator, and NoiseXTerminator to run without errors. This involves changing the AI definition from the “mlpackage” format to the less-accurate “mlmodel” format, which will sacrifice precision and may result in some posterization. Note that the procedure below shows the workaround for BlurXTerminator, but the same change applies to StarXTerminator and NoiseXTerminator. The key is to change mlpackage to mlmodel in the instance source code.

Click the “edit instance source code” button at the bottom of the window:

Edit the P.ai_file parameter, replacing mlpackage with mlmodel. It should look like this:

P.ai_file = "BlurXTerminator.2.mlmodel";

Click the green checkbox to save this edit:

The tool should now run without errors. Note that using the “mlmodel” format instead of “mlpackage” results in lower numerical precision. This won’t affect most images, but in very bright areas there may be some posterization.