webonnx / wonnx

A WebGPU-accelerated ONNX inference run-time written 100% in Rust, ready for native and the web
Other
1.54k stars 54 forks source link

Support for ONNX scaler datatype `bool` #184

Closed mush42 closed 10 months ago

mush42 commented 10 months ago

Describe the bug

Many of the models that I try to run fail with the following message:

$nnx infer model.onnx
Error: backend execution error: IR error: issue with data types: the ONNX scalar data type 'BOOL' is not supported

Expected behavior

I should be able to run the model without issues.

pixelspark commented 10 months ago

As the error states: WONNX does not support the 'bool' value type just yet. You may want to have a look at the model's nodes (using e.g. Netron) to see where and how it uses bools. In most cases there is only minimal usage and it may be possible to replace it.