Title here
Summary here
import { parseOnnx } from "@wetron/onnx";
function parseOnnx(bytes: Uint8Array): ModelGraph;value_infoModelGraph.initializers, plus raw bytes via ModelGraph.weights.get(name)graph.opsets: ReadonlyMap<string, number> (domain -> version; "" = ai.onnx)value_info entries in the graph protoIf, Loop, and Scan subgraphs are inlined with prefixed names (<parent>/<attrName>/...) up to a depth of 4node.domain is set for non-standard domains (e.g. com.microsoft, ai.onnx.ml). It is absent for standard ai.onnx operators.
graph.opsets is only set by the ONNX parser. Pass it to NodePropertyPanel via opsets={graph?.opsets} to show opset versions in the node header.
ModelGraph.weights - the parser indexes them but does not decode until requested. See
Weights for decodeWeight, decodeFirstN, and computeStats.protobufjs - not a hand-rolled binary reader.