NVIDIA Video Effects (VFX) Python Bindings GuideΒΆ

Python bindings for the NVIDIA VFX SDK.

Table of Contents

Framework-agnostic: works with PyTorch, CuPy, JAX, or any DLPack-compatible array.

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()