Add ONNX Conversion and Triton Inference Server Support#1
Open
rensortino wants to merge 13 commits intomainfrom
Open
Add ONNX Conversion and Triton Inference Server Support#1rensortino wants to merge 13 commits intomainfrom
rensortino wants to merge 13 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ONNX Conversion and Triton Inference Server Support
Overview
This PR adds comprehensive support for exporting SAM3 models to ONNX format and deploying them using Triton Inference Server. The implementation includes model export utilities, ONNX runtime inference, PyTorch inference, and full Triton Server integration with TensorRT conversion capabilities.
Key Features
🚀 Model Export & Conversion
🔥 Inference Engines
📦 Deployment Infrastructure
🎨 Developer Experience
Changes Summary
New Files Added
Core Inference Scripts
export_to_onnx.py- Export SAM3 model components to ONNX formatinference_onnx.py- ONNX Runtime inference engineinference_torch.py- PyTorch inference enginemodel.py- Model wrapper classes for ONNX export (VisionEncoderWrapper, TextEncoderWrapper, GeometryEncoderWrapper, DecoderWrapper)utils.py- Shared utilities for preprocessing, postprocessing, and visualizationTriton Integration
call_triton_models.py- Client script to call individual Triton modelscall_triton_pipeline.py- Client script to call Triton pipeline modelmodel_repository/- Complete Triton model repository structure:vision-encoder/config.pbtxttext-encoder/config.pbtxtgeometry-encoder/config.pbtxtdecoder/config.pbtxtpipeline/config.pbtxt+ Python backend implementationScripts & Utilities
scripts/pbtxt_from_onnx.py- Extract Triton config files from ONNX modelsscripts/convert_to_tensorrt.sh- Convert ONNX models to TensorRTscripts/pack_conda_env.sh- Package conda environment for Triton Python backendgradio_app.py- Interactive Gradio web interfaceBuild & Documentation
Justfile- Task runner with convenient commandsREADME.md- Comprehensive documentation.gitignore- Git ignore rulesuv.lock- Dependency lock file for reproducible buildsDependencies
uvpackage manager (for dependency management)