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)
  • Dependencies:
    • onnxruntime (ONNX Runtime SDK)
    • ONNX
    • Protobuf
  • Optional Backend Dependencies:
    • DirectML (Windows): Requires DirectML SDK. Define the DML_DIR environment/CMake variable to point to the SDK directory.
    • CUDA: Requires CUDAToolkit and cuDNN SDKs. Ensure CUDA_PATH, CUDNN_PATH / CUDNN_HOME are set correctly.

Compilation

By default, the package builds the CPU backend (with CoreML on macOS and optionally DirectML on Windows):

uv build --package vapoursynth-mlrt-ort

To build the CUDA-enabled version, the package definition must first be updated using the helper script:

# Update pyproject.toml package configuration to target CUDA
uv run --script scripts/cuda_pyproject.py pyproject.toml

# Compile the CUDA package
uv build --package vapoursynth-mlrt-ort-cuda

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.

Building and Installation

To build, you will need ONNX Runtime, protobuf, ONNX and their dependencies.

Please refer to ONNX Runtime Docs for installation notes. Or, you can use our prebuilt Windows binary releases from AmusementClub.

Please refer to our github actions workflow for sample building instructions.

If you only use the CPU backend, then you just need to extract binary release into your vapoursynth/plugins directory.

However, if you also use the CUDA backend, you will need to download some CUDA libraries as well, please see the release page for details. Those CUDA libraries also need to be extracted into VS vapoursynth/plugins directory. The plugin will try to load them from vapoursynth/plugins/vsort/ directory or vapoursynth/plugins/vsmlrt-cuda/ directory.

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 = True, bint builtin = False, string builtindir="models", 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 True. It might incur some startup latency.
  • bint builtin: whether to load the model from the VS plugins directory, see also builtindir.
  • string builtindir: the model directory under VS plugins directory for builtin models, default "models".
  • 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vapoursynth_mlrt_ort-16.1.tar.gz (676.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vapoursynth_mlrt_ort-16.1-py3-none-win_amd64.whl (16.2 MB view details)

Uploaded Python 3Windows x86-64

vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (10.3 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (8.9 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_x86_64.whl (11.5 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_arm64.whl (9.5 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

File details

Details for the file vapoursynth_mlrt_ort-16.1.tar.gz.

File metadata

  • Download URL: vapoursynth_mlrt_ort-16.1.tar.gz
  • Upload date:
  • Size: 676.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for vapoursynth_mlrt_ort-16.1.tar.gz
Algorithm Hash digest
SHA256 5888b3cfd09889c42882ff62a0ed73b1b55055216f561e79c427cc802d81484d
MD5 7ad0960da1949a3c4161e74cc3d61ec5
BLAKE2b-256 bbfce8af2d44974fd51b28416de6406eb2963b2d8ca0e543879ee6081beea007

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_mlrt_ort-16.1.tar.gz:

Publisher: cd-publish.yml on Jaded-Encoding-Thaumaturgy/vs-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_mlrt_ort-16.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for vapoursynth_mlrt_ort-16.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d7a550d6a93040bf7d50ab5f1e9de21a39509978a57cd75bb0a0cb2c205767d5
MD5 047936f8b268b0bba8c1c93fbfbd6d99
BLAKE2b-256 c7caae57839dc4777a18a2aa481427285e877aad27086c1f10d6d7b2365ddbb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_mlrt_ort-16.1-py3-none-win_amd64.whl:

Publisher: cd-publish.yml on Jaded-Encoding-Thaumaturgy/vs-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d1fb2858b58964be65674adf14fc10f60d9ce58bfde669fe14382be1c5df8a7e
MD5 4d2042559b260827322f77b884fb1090
BLAKE2b-256 593ee4ecfc30c112fb05c651345865f7fa7ae1b808aaf6bd746577f116f747bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd-publish.yml on Jaded-Encoding-Thaumaturgy/vs-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1acc543e94239eb7f8f71be5e40064d5e95a4f93bf9f810f45fe67cdc09a985d
MD5 8310e8038290ec6611fd8aff5dfbbf45
BLAKE2b-256 a1511e542a0897976800892227debb6112f9e1fd0500d87257c0a3528e4aae3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_mlrt_ort-16.1-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cd-publish.yml on Jaded-Encoding-Thaumaturgy/vs-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 32ff24aac7502aba27b9cd29fc5c9e71d6f0ccb189b930dd0e507a2909f74fc6
MD5 b1f0cfb40b088727036400a72de4be2d
BLAKE2b-256 a71970010f48d4b29f8e99db068f5a0d8b77efb57ec5aa848f1c41f10965edbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_x86_64.whl:

Publisher: cd-publish.yml on Jaded-Encoding-Thaumaturgy/vs-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 13ac2f6ad2e64b37419a7fe6d7c35779566c734390e3005590f5093d3fb8cee4
MD5 cdb6c139b0ab8c828b3ef77825254042
BLAKE2b-256 5bb3f26933d496955e5c0c681e9c0b0c7afda99916fe32c60b2585ef67cad93a

See more details on using hashes here.

Provenance

The following attestation bundles were made for vapoursynth_mlrt_ort-16.1-py3-none-macosx_15_0_arm64.whl:

Publisher: cd-publish.yml on Jaded-Encoding-Thaumaturgy/vs-wheels

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

16.2

6 files

This release

16.1 This release

6 files

16.0

6 files

15.16

6 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