Skip to navigation

Export EdgeCrafter

Runs on: gpu Dockerfile
First run can take longer while the worker pulls the configured Docker image.

Overview

Converts a trained EdgeCrafter checkpoint into each format you select and attaches each one to the model version the weights came from.

The exports stay on that version, and the model page lists them for download. A format already exported from the same checkpoint at the same precision is reused instead of converted again.

Train EdgeCrafter Export EdgeCrafter Exported model files

Prerequisites

RequirementWhat you need
EdgeCrafter checkpointA EdgeCrafter model version with weights of its own, e.g. one from Train EdgeCrafter. A model copied from the catalog has no file to convert, because its public weights are downloaded by name.
Training configThe EdgeCrafter config the checkpoint was trained with. Training stores it on the model asset, and the export reads it from there.
NVIDIA GPUA GPU worker with a working NVIDIA runtime. The node requests one for every run, and TensorRT compiles the engine on it.

How it works

1

Checks each ticked format against the exports already on the model version and skips the ones built from the same checkpoint at the same precision.

2

Downloads the checkpoint and, for ONNX or TensorRT, the config stored with the model.

3

Rebuilds the model together with its postprocessor exactly as the predict node does, so the exported graph returns labels, boxes, and scores directly instead of raw tensors, then traces it to ONNX at the input size recorded in the config.

4

Builds the TensorRT engine from that same ONNX graph when its checkbox is ticked, so asking for both costs one trace.

5

Attaches every produced file, and the class list, to the source model version.

FAQ

No. Each export is another file on the version it came from, so one checkpoint can carry its PyTorch, ONNX, and TensorRT exports side by side while the weights stay untouched.

The model and its postprocessor, in one graph. Inputs are images (N x 3 x H x W, float RGB scaled to 0..1; normalization, when the config asks for it, is inside the graph) and orig_target_sizes (N x 2, the original image width and height). Outputs are labels, boxes (xyxy, in original-image pixels), and scores, plus masks for an ECSeg model. There is no NMS: the detector emits a fixed set of queries, so no suppression step is needed.

The engine is built with half-precision layers allowed. The ONNX graph stays full precision, and the engine keeps the input and output types the ONNX file declares. Exports at different precisions are filed side by side on the version.

The TensorRT engine is built from an intermediate ONNX graph. Ticking both in one run traces the model once and reuses that graph, where two separate runs would trace it twice.

The evaluation size from the training config, which is 640 by 640 unless training changed it. The ONNX graph’s batch dimension is dynamic, so it serves any batch size; the TensorRT engine is built for one image per call (batch 1).

Only when your runtime rejects the default. A lower opset can widen compatibility with older runtimes, at the cost of failing when the model uses a newer operator.

A classes.txt listing one class per line, so line N names the class the graph reports as index N. It is copied from the version, which is the index space the model was trained on, and the checkpoint answers only when the version records none.

The file was written but the structural check did not pass or could not run. The export still finishes, so treat the warning as a signal to test the file before deploying it.

Inputs

Model
modelRequired

EdgeCrafter model (ECDet or ECSeg) whose weights are exported, e.g. a version trained in this workspace. A model copied from the catalog hosts no weights of its own and has nothing to export, so train from it first. Key: MODEL.

Export to PyTorch
booleanDefaults to falseRequired

Attach the model’s safetensors weights as the PyTorch export. Key: EXPORT_PYTORCH.

Export to ONNX
booleanDefaults to falseRequired

Trace the checkpoint to an ONNX graph that holds the model and its postprocessor. Inputs are images (N x 3 x H x W, float RGB in 0..1) and orig_target_sizes (N x 2, original width and height), outputs are labels, boxes (xyxy in original-image pixels) and scores, plus masks for an ECSeg model. The graph contains no NMS: the DETR-style head emits a fixed set of queries. Key: EXPORT_ONNX.

Export to TensorRT
booleanDefaults to falseRequired

Build a TensorRT engine. It is cut from an intermediate ONNX graph, so ticking ONNX as well costs one trace rather than two. Key: EXPORT_TENSORRT.

ONNX opset
integerDefaults to 17Required

Version of the ONNX operator set the exported graph targets. Lower it when the runtime you deploy to cannot read the default. Minimum: 11. Key: OPSET.

TensorRT FP16
booleanDefaults to falseRequired

Builds the engine with half-precision layers, which run faster and use less GPU memory at a small cost in accuracy. The ONNX graph stays full precision. Key: TRT_FP16.

Outputs

Exported formats
string

Format keys this run produced, comma separated. Read by the download widget. Hidden from the flow editor. Key: EXPORT_FORMATS.

Model
model

The model that was exported, as <model id>@<version id> - the same reference this node was given. An export is another file on that version, not a version of its own, so this output wires on to anything the input accepts. Shown as an artifact. Key: MODEL.

Widgets

The model download widget downloads what this run produced: a single file when the run produced exactly one, and a zip of every ticked format, class lists included, when it produced more. The model version page lists the same files one by one.

Runtime

The export runs in the EdgeCrafter Docker image on a GPU worker. Every run checks that the GPU it was given works before it downloads anything, and stops if it does not, so a broken worker fails in seconds instead of converting on the CPU at the GPU price.

The image carries TensorRT, NVIDIA software under NVIDIA’s license.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Export EdgeCrafter",
"description": "Convert a trained EdgeCrafter checkpoint to PyTorch, ONNX and TensorRT, with the postprocessor inside the graph, and attach every format to the model it came from.",
"category": "Models",
"namespace": "ovalbee",
"templateKey": "models/edgecrafter/export_edgecrafter",
"version": "v1",
"inputs": [
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "EdgeCrafter model (ECDet or ECSeg) whose weights are exported, e.g. a version trained in this workspace. A model copied from the catalog hosts no weights of its own and has nothing to export, so train from it first.\n",
"required": true,
"default": null,
"visibleWhen": null,
"options": {
"framework": "edgecrafter"
}
},
{
"key": "EXPORT_PYTORCH",
"label": "Export to PyTorch",
"type": "boolean",
"description": "Attach the model's safetensors weights as the PyTorch export.\n",
"required": true,
"default": false,
"visibleWhen": null
},
{
"key": "EXPORT_ONNX",
"label": "Export to ONNX",
"type": "boolean",
"description": "Trace the checkpoint to an ONNX graph that holds the model and its postprocessor. Inputs are `images` (N x 3 x H x W, float RGB in 0..1) and `orig_target_sizes` (N x 2, original width and height); outputs are `labels`, `boxes` (xyxy in original-image pixels) and `scores`, plus `masks` for an ECSeg model. The graph contains no NMS: the DETR-style head emits a fixed set of queries.\n",
"required": true,
"default": false,
"visibleWhen": null
},
{
"key": "EXPORT_TENSORRT",
"label": "Export to TensorRT",
"type": "boolean",
"description": "Build a TensorRT engine. It is cut from an intermediate ONNX graph, so ticking ONNX as well costs one trace rather than two.",
"required": true,
"default": false,
"visibleWhen": null
},
{
"key": "OPSET",
"label": "ONNX opset",
"type": "number",
"description": "Version of the ONNX operator set the exported graph targets. Lower it when the runtime you deploy to cannot read the default.",
"required": true,
"default": 17,
"visibleWhen": null,
"options": {
"type": "integer",
"min": 11
}
},
{
"key": "TRT_FP16",
"label": "TensorRT FP16",
"type": "boolean",
"description": "Builds the engine with half-precision layers, which run faster and use less GPU memory at a small cost in accuracy. The ONNX graph stays full precision.",
"required": true,
"default": false,
"visibleWhen": null
}
],
"outputs": [
{
"key": "EXPORT_FORMATS",
"label": "Exported formats",
"type": "string",
"description": "Format keys this run produced, comma separated. Read by the download widget.",
"artifact": false,
"badge": false,
"badgeOpens": null,
"hidden": true
},
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "The model that was exported, as `<model id>@<version id>` - the same reference this node was given. An export is another file on that version, not a version of its own, so this output wires on to anything the input accepts.\n",
"artifact": true,
"badge": false,
"badgeOpens": null,
"hidden": false
}
],
"runtime": {
"type": "docker",
"devices": [
"gpu"
],
"dockerImage": "ovalbee/node-edgecrafter:0.0.41"
},
"widgets": {
"widget": {
"id": "model-download",
"settings": {
"assetId": {
"type": "variable",
"value": "self.outputs.MODEL"
},
"format": {
"type": "variable",
"value": "self.outputs.EXPORT_FORMATS"
}
}
}
}
}