Skip to content
Voro
  1. Voro
  2. Authoring

ONNX FX

ONNX FX runs a model from an .onnx file. There is no source to write. You choose the file, describe its inputs and outputs in a config, and press Reload. The session runs on the GPU with device-bound inputs and outputs.

The shipped model operators in the Image view, Depth Anything, Detect RF-DETR, Segment SAM, Upscale and StyleGAN, are ONNX FX with their model and config already chosen. Place ONNX FX itself to bring a model of your own.

Place ONNX FX from the Image view of the Voro menu. On the Model page:

  • Modelpath is the .onnx file on disk.
  • Configpath is the config that names the graph’s inputs and outputs and how the image maps onto them.
  • Reload loads the model and config.

Mix on the Controls page blends the model’s result with the input, and it applies live.

For a model with one float32 image input named images and one output named output, this is a starting config. Save it as model.onnx.voro.json and select it in Configpath:

{
"schema": "voro.onnx_runner.v1",
"model": {
"inputs": [
{ "bind": "in", "name": "images", "layout": "nchw", "dtype": "f32" }
],
"outputs": [
{ "bind": "out", "name": "output", "layout": "nchw", "dtype": "f32" }
]
},
"pre": [],
"post": []
}

Change each name to the exact tensor name in your model. bind connects the model tensor to the runner’s input or output. Keep in and out for this basic image path. nchw means batch, channels, height and width; f32 means float32 values.

This config has no preprocessing or postprocessing. It suits a model that already accepts the incoming image dimensions, channels and value range and returns an image. A model that expects resized or normalized input needs those operations in its config. Detection results and other non-image outputs also need a config that describes their tensors and processing.

Set Modelpath, wire an image into image, then Reload. Inspect out with Mix at 1 to see the model result without the original blended in.

Press Reload after changing the model or the config. A model that fails to load leaves the previous session running and reports the error on the node.

Save as Custom Module writes main.onnx and presets.json into a folder under voro_custom, and the module appears in the Custom column of the Image view. See Custom modules.

The reference page is ONNX FX.