NVIDIA Video Effects (VFX) Python Bindings GuideΒΆ

Python bindings for the NVIDIA VFX SDK.

Accepts DLPack-compatible CUDA inputs from PyTorch, CuPy, JAX, and other array libraries. Each effect returns a raw DLPack capsule that references SDK-owned memory; framework compatibility varies by consumer. Ensure producer work has completed before importing the output, then clone/copy it and synchronize the copy before another run() or close().

Example (PyTorch):
>>> import torch
>>> from nvvfx import VideoSuperRes
>>> input_frame = torch.rand(3, 540, 960, device="cuda")
>>> with VideoSuperRes() as sr:
...     sr.output_width = 1920
...     sr.output_height = 1080
...     sr.load()
...     output = torch.from_dlpack(sr.run(input_frame).image).clone()
>>> output.shape
torch.Size([3, 1080, 1920])

Example (CuPy):

import cupy
from nvvfx import VideoSuperRes

input_frame = cupy.random.rand(3, 540, 960, dtype=cupy.float32)
with VideoSuperRes() as sr:
    sr.output_width = 1920
    sr.output_height = 1080
    sr.load()
    output = cupy.from_dlpack(sr.run(input_frame).image).copy()