Problem IsInf threw "Unsupported mode" when detect_positive and detect_negative were both 0. ONNX expects an all-false output in that case. Fix Fill the output with zeros in that branch instead of calling CV_Error.