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

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
File Size Uploaded
vapoursynth_mlrt_ort-17.1.tar.gz 104.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for vapoursynth-mlrt-ort 17.1
File
vapoursynth_mlrt_ort-17.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vapoursynth_mlrt_ort-17.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-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.27+ ARM64, Linux glibc 2.28+ ARM64 Details
vapoursynth_mlrt_ort-17.1-py3-none-macosx_15_0_x86_64.whl Python 3 none macOS 15.0+ x86-64 Details
vapoursynth_mlrt_ort-17.1-py3-none-macosx_15_0_arm64.whl Python 3 none macOS 15.0+ ARM64 Details

Total release size: 55.2 MB

Release files / vapoursynth_mlrt_ort-17.1.tar.gz

Download URL vapoursynth_mlrt_ort-17.1.tar.gz
Size 104.8 kB
Tags Source
SHA-256 checksum
How to use checksums
590e2fd1c6ebb79174dcf1788a4ab4b82c6f6a8aaca4ff2b42394e77dacc59f2
BLAKE2b-256 checksum
How to use checksums
470bc8d93391507392f57e8ceff1fab7e15921ac9abc91c959688073d443cda7
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 Sep 16, 2026.

Transparency log

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

Download URL vapoursynth_mlrt_ort-17.1-py3-none-win_amd64.whl
Size 16.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
b0941fe55848186e16240722eaa2df4d6f55ab937451fde79bfa03775ba4f775
BLAKE2b-256 checksum
How to use checksums
632e183e1b9d00832d481bbc919fc67cfa90b40d7cea9fe6833236ef466de795
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 Sep 16, 2026.

Transparency log

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

Download URL vapoursynth_mlrt_ort-17.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 10.3 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b0f4012634efda0b65675e74a6eade016adf5bee608f79804a347e03f8b7956e
BLAKE2b-256 checksum
How to use checksums
dd4166b339f82e79eeb1facd006287ef568c04556cd4aa2308bc872d641ffc4b
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 Sep 16, 2026.

Transparency log

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

Download URL vapoursynth_mlrt_ort-17.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Size 9.0 MB
Tags Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
548a0a1628b440a9d5fd4ff414865249a910ba09f955b9d36445d746d5649fdd
BLAKE2b-256 checksum
How to use checksums
c7ef3f7158dda3bbaae9484d8818a8d1bce674eadfe60d178581b7a6f817e82f
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 Sep 16, 2026.

Transparency log

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

Download URL vapoursynth_mlrt_ort-17.1-py3-none-macosx_15_0_x86_64.whl
Size 10.8 MB
Tags Python 3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
213cdc95967838868db0beeb7865cd87ec293ef19e0aa082c250919611768fcd
BLAKE2b-256 checksum
How to use checksums
e6a24936d53ceaf5776d9741f358e8c74a7ceca4d68c9f91d012c39e5006275d
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 Sep 16, 2026.

Transparency log

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

Download URL vapoursynth_mlrt_ort-17.1-py3-none-macosx_15_0_arm64.whl
Size 8.9 MB
Tags Python 3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5c58219e579697248f7642c56f85aa3efba7cb0cc640162ecc92f2db7aba35ec
BLAKE2b-256 checksum
How to use checksums
0220ac3a2df83dad8b93587a0e8a3ba4c5436606dcee6d33fc719909a9710398
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 Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

17.1 This release

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