Skip to main content

VapourSynth-MLRT-ORT

This package contains the ONNX Runtime backend implementation of the vs-mlrt plugin.

Installation

To install the standard CPU/DirectML/CoreML package:

pip install vapoursynth-mlrt-ort

To install the CUDA-enabled package:

pip install "vapoursynth-mlrt-ort[cuda]"

Building from source

Requirements

  • C++ Compiler: C++20 compatible (e.g. MSVC 2019+, GCC, Clang)
  • Build Tools: uv, CMake, Ninja
  • Dependencies (must be built/installed before the plugin):
    • onnxruntime (ONNX Runtime SDK — built from source in CI)
    • ONNX (built from source, version matched to ONNX Runtime's pinned submodule)
  • Backend-specific Dependencies:
    • DirectML (Windows only): DirectML SDK. Set DML_DIR to the SDK directory.
    • CUDA (Windows/Linux): CUDAToolkit and cuDNN. Ensure CUDA_PATH and CUDNN_PATH/CUDNN_HOME are set.
    • CoreML (macOS only): Enabled automatically, no extra setup needed.

Compilation

  1. Initialize the submodule:

    git submodule update --init --recursive vsmlrt/ort/vs-mlrt
    
  2. Build ONNX Runtime from source (or install a pre-built SDK), then build ONNX from source using the version pinned by ONNX Runtime (onnxruntime/cmake/external/onnx/). Both must be discoverable by CMake (via CMAKE_PREFIX_PATH or installed system-wide).

  3. Set environment variables for backend-specific SDKs:

    # Windows DirectML
    $env:DML_DIR = "C:\Path\To\DirectML"
    
  4. Build the wheel:

    uv build --package vapoursynth-mlrt-ort
    

    To disable bundling CUDA provider libraries into the main wheel (CI does this, shipping them in a separate vapoursynth-mlrt-ort-cuda package instead):

    uv build --package vapoursynth-mlrt-ort -C "cmake.define.INSTALL_CUDA=OFF"
    

Detailed parameter information from the parent project follows.


VapourSynth ONNX Runtime

The vs-onnxruntime plugin provides optimized CPU & CUDA runtime for some popular AI filters.

Usage

Prototype: core.ort.Model(clip[] clips, string network_path[, int[] overlap = None, int[] tilesize = None, string provider = "", int device_id = 0, int verbosity = 2, bint cudnn_benchmark = False, bint fp16 = False, bint path_is_serialization = False, bint use_cuda_graph = False])

Arguments:

  • clip[] clips: the input clips, only 32-bit floating point RGB or GRAY clips are supported. For model specific input requirements, please consult our wiki.
  • string network_path: the path to the network in ONNX format.
  • int[] overlap: some networks (e.g. CNN) support arbitrary input shape where other networks might only support fixed input shape and the input clip must be processed in tiles. The overlap argument specifies the overlapping (horizontal and vertical, or both, in pixels) between adjacent tiles to minimize boundary issues. Please refer to network specific docs on the recommended overlapping size.
  • int[] tilesize: Even for CNN where arbitrary input sizes could be supported, sometimes the network does not work well for the entire range of input dimensions, and you have to limit the size of each tile. This parameter specify the tile size (horizontal and vertical, or both, including the overlapping). Please refer to network specific docs on the recommended tile size.
  • string provider: Specifies the device to run the inference on.
    • "CPU" or "": pure CPU backend
    • "CUDA": CUDA GPU backend, requires Nvidia Maxwell+ GPUs.
    • "DML": DirectML backend
    • "COREML": CoreML backend
  • int device_id: select the GPU device for the CUDA backend.'
  • int verbosity: specify the verbosity of logging, the default is warning.
    • 0: fatal error only, ORT_LOGGING_LEVEL_FATAL
    • 1: also errors, ORT_LOGGING_LEVEL_ERROR
    • 2: also warnings, ORT_LOGGING_LEVEL_WARNING
    • 3: also info, ORT_LOGGING_LEVEL_INFO
    • 4: everything, ORT_LOGGING_LEVEL_VERBOSE
  • bint cudnn_benchmark: whether to let cuDNN use benchmarking to search for the best convolution kernel to use. Default False. It might incur some startup latency.
  • bint fp16: whether to quantize model to fp16 for faster and memory efficient computation.
  • bint path_is_serialization: whether the network_path argument specifies an onnx serialization of type bytes.
  • bint use_cuda_graph: whether to use CUDA Graphs to improve performance and reduce CPU overhead in CUDA backend. Not all models are supported.
  • int ml_program: select CoreML provider.
    • 0: NeuralNetwork
    • 1: MLProgram

When overlap and tilesize are not specified, the filter will internally try to resize the network to fit the input clips. This might not always work (for example, the network might require the width to be divisible by 8), and the filter will error out in this case.

The general rule is to either:

  1. left out overlap, tilesize at all and just process the input frame in one tile, or
  2. set all three so that the frame is processed in tilesize[0] x tilesize[1] tiles, and adjacent tiles will have an overlap of overlap[0] x overlap[1] pixels on each direction. The overlapped region will be throw out so that only internal output pixels are used.

Metadata

Release files for vapoursynth-mlrt-ort 17.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vapoursynth-mlrt-ort 17.1.1
File Size Uploaded
vapoursynth_mlrt_ort-17.1.1.tar.gz 104.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for vapoursynth-mlrt-ort 17.1.1
File
vapoursynth_mlrt_ort-17.1.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vapoursynth_mlrt_ort-17.1.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
vapoursynth_mlrt_ort-17.1.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 Details
vapoursynth_mlrt_ort-17.1.1-py3-none-macosx_15_0_x86_64.whl Python 3 none macOS 15.0+ x86-64 Details
vapoursynth_mlrt_ort-17.1.1-py3-none-macosx_15_0_arm64.whl Python 3 none macOS 15.0+ ARM64 Details

Total release size: 56.6 MB

Release files / vapoursynth_mlrt_ort-17.1.1.tar.gz

Download URL vapoursynth_mlrt_ort-17.1.1.tar.gz
Size 104.8 kB
Tags Source
SHA-256 checksum
How to use checksums
285ccfef2008aa1ef0567d734514e7cb9864a7ac9990188e181afda7d30a5adb
BLAKE2b-256 checksum
How to use checksums
b9fcc09d96c7fad7d5da956b465257c490763877132162eb687dd90808102425
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / vapoursynth_mlrt_ort-17.1.1-py3-none-win_amd64.whl

Download URL vapoursynth_mlrt_ort-17.1.1-py3-none-win_amd64.whl
Size 16.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
421c09f03f5dc31242a6653b945397c942edcb4da6a936d99d15080e02925606
BLAKE2b-256 checksum
How to use checksums
3d4cc5f7d21cc21d752ddc1c4a24cca1d36347fd7a6cd9ccbd2dcd155dac6580
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / vapoursynth_mlrt_ort-17.1.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL vapoursynth_mlrt_ort-17.1.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 10.7 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
aef95223442dc5e2c73420c551935924886595dd6fff36d075c9e6ffc8956a68
BLAKE2b-256 checksum
How to use checksums
9cafa2042590555b909e113d2ab33aac0fcc8807bf33dea59af7a60e38bb0c56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / vapoursynth_mlrt_ort-17.1.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

Download URL vapoursynth_mlrt_ort-17.1.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 9.2 MB
Tags Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
8a43b3f8916ab28bfdd685621178611a79f07b88de5043af93ab6425a1530032
BLAKE2b-256 checksum
How to use checksums
eb10b1a68ad2ceb823c869e045996b79971ab4b66baf838d1bf2960a6826f207
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / vapoursynth_mlrt_ort-17.1.1-py3-none-macosx_15_0_x86_64.whl

Download URL vapoursynth_mlrt_ort-17.1.1-py3-none-macosx_15_0_x86_64.whl
Size 11.2 MB
Tags Python 3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
a82f291dc74aad96c20b2b2e03ce810a3d9dcc6b7633c40db5e92b53672da0df
BLAKE2b-256 checksum
How to use checksums
6b87a1ef669ed2d92fe1a469b5bdc7a32c90621d88e9d4ba0942d8ab81a0d257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / vapoursynth_mlrt_ort-17.1.1-py3-none-macosx_15_0_arm64.whl

Download URL vapoursynth_mlrt_ort-17.1.1-py3-none-macosx_15_0_arm64.whl
Size 9.2 MB
Tags Python 3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
a5578d41377a61e1ebf51fb8a5ae639d243bf678ef0ee83bbb1fd749a8d67dcb
BLAKE2b-256 checksum
How to use checksums
085157ddf61f669649f7d469600d72e1e39fbd10acbab61b86bf93f30fc44b8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

17.1.1 This release

6 release files

17.1

6 release files

17.0

6 release files

16.2

6 release files

16.1

6 release files

16.0

6 release files

15.16

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page