Skip to navigation

Export GTR

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

Overview

Attaches a trained GTR checkpoint to the model version it came from as a PyTorch export, together with its class list. The model page lists the export for download, and a checkpoint already exported is reused instead of uploaded again.

GTR has no ONNX or TensorRT export yet. Its backbone’s gated linear attention leaves an ONNX graph as a custom operator that only GTR’s own TensorRT plugin runs, and an engine built with that plugin did not reproduce the PyTorch model, so this node does not offer it.

Train GTR Export GTR Exported model files

Prerequisites

RequirementWhat you need
GTR checkpointA GTR model version with weights of its own, e.g. one from Train GTR. A model copied from the catalog has no file to export, because its public weights are downloaded by name.

How it works

1

Checks the exports already on the model version and stops early when this checkpoint is already attached as a PyTorch export.

2

Downloads the checkpoint and takes the class names from the version, or from the checkpoint when the version records none.

3

Attaches the checkpoint and a classes.txt to the source model version.

FAQ

No. The export is another file on the version it came from, and the weights stay untouched.

GTR’s attention runs as a custom operator in ONNX, which ONNX Runtime cannot execute and which TensorRT runs only through GTR’s own FP16 plugin. An engine built that way returned invalid values for a trained GTR-S checkpoint, so the node exports PyTorch only.

A classes.txt listing one class per line, so line N names the class the model 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.

Inputs

Model
modelRequired

Model 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.

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 the exported checkpoint. The model version page lists the same files one by one.

Runtime

The export runs in the GTR Docker image. It only downloads and uploads files, so it needs no GPU.

JSON config

Machine-readable node interface for automation and advanced usage.

{
"name": "Export GTR",
"description": "Attach a trained GTR checkpoint to the model it came from as a PyTorch export. GTR has no ONNX or TensorRT export yet.",
"category": "Models",
"namespace": "ovalbee",
"templateKey": "models/gtr/export_gtr",
"version": "v1",
"inputs": [
{
"key": "MODEL",
"label": "Model",
"type": "model",
"description": "Model 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": "gtr",
"task_type": "object_detection"
}
}
],
"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",
"cpu"
],
"dockerImage": "ovalbee/node-gtr:0.0.14"
},
"widgets": {
"widget": {
"id": "model-download",
"settings": {
"assetId": {
"type": "variable",
"value": "self.outputs.MODEL"
},
"format": {
"type": "variable",
"value": "self.outputs.EXPORT_FORMATS"
}
}
}
}
}