Skip to main content

Add Temporal Coherence to AI Upscales in VapourSynth

When using SISR models (single image super resolution) on video, they tend to create slightly different results each frame. TemporalFix is a post filter that averages these results over multiple frames, removing temporal inconsistencies like fizzle or wiggly lines. Also known as stabilization, deshimmering, temporal denoising, or temporal fix.



Installation

Nvidia

pip install -U vs_temporalfix[tensorrt] --extra-index-url https://pypi.nvidia.com/

To enable the CPU/CUDA backends, install PyTorch with CUDA. (optional)

Others

pip install -U vs_temporalfix

To enable the CPU backend, install PyTorch. (optional)



TemporalFix AI Model

The newest and most capable version of temporalfix. It is easy to use and can run very fast on Nvidia GPUs.

import vs_temporalfix
clip = vs_temporalfix.model(clip, strength=2.0, exclude=None, backend="tensorrt", tiles=1, num_streams=1, gpu_id=0, engine_folder=None)

clip
Temporally unstable upscaled clip. Must be in RGBH format.

strength
Suppression strength of temporal inconsistencies in the 0.0-3.0 range. Higher means more aggressive.
Higher resolution tends to need higher strength. Too high may oversmooth small movements.

exclude (optional)
Optionally exclude scenes with intended temporal inconsistencies.
Brackets define excluded frame ranges. Example for two scenes: exclude="[10 20] [600 900]"

backend (optional)
The backend used to run the model:

  • cpu CPU mode (very slow).
  • cuda GPU mode using CUDA. Requires any Nvidia GPU (fast).
  • directml GPU mode using DirectML. Works on most GPUs, but Windows only (faster, high vram).
  • tensorrt GPU mode using TensorRT. Requires an Nvidia RTX GPU. On the first run, this mode will automatically build an engine, which may take a few minutes. Changing strength or input dimensions will trigger rebuilding, but previously build engines are stored (very fast, low vram).

tiles (optional)
A higher amount of tiles will reduce VRAM usage at the cost of speed.
This should only be needed on low end hardware. Default tiles=1 uses the full frame, which is fastest.

num_streams (optional)
Number of parallel TensorRT streams. For high end GPUs higher can be faster, but requires more VRAM. Only affects the TensorRT backend.

gpu_id (optional)
Which GPU to use starting from 0. Can be used to switch between iGPU/dGPU. Does not affect the CPU backend.

engine_folder (optional)
Optional path to the TensorRT engine storage location. By default engines are stored in vs_temporalfix/engines. Only affects the TensorRT backend.


TemporalFix Classic

The original CPU based version. It is harder to tune, may miss some areas, and only works well for 2D animation.

import vs_temporalfix
clip = vs_temporalfix.classic(clip, strength=500, tr=6, denoise=False, exclude=None, debug=False)

clip
Temporally unstable upscaled clip. Any format.

strength
Suppression strength of temporal inconsistencies. Higher means more aggressive. 400-700 works great in most cases.
The best way to finetune is to find a static scene and adjust till lines and details are stable.
Reduce if you get blending/ghosting on small movements, especially in dark or hazy scenes.

tr
Temporal radius sets the number of frames to average over.
Higher means more stable, especially on slow pans and zooms, but is slower. 6 works great in most cases.
The best way to finetune is to find a slow pan or zoom and adjust till lines and details are stable.

denoise (optional)
Removes grain and low frequency noise/flicker left over by the main processing step. Only enable if these issues actually exist! It risks to remove some details like every denoiser, but is useful if you're planning to denoise anyway and has the benefit of almost no performance impact compared to using an additional denoising filter.

exclude (optional)
Optionally exclude scenes with intended temporal inconsistencies.
Brackets define excluded frame ranges. Example for two scenes: exclude="[10 20] [600 900]"

debug (optional)
Shows areas that will not be fixed in pink. This includes areas with high motion, scene changes and excluded scenes. Can help while tuning parameters to see if the area is even affected.


Benchmarks

Model benchmarks were done on a RTX 4090 GPU and Classic benchmarks on a Ryzen 5900X CPU.

AI Model
Resolution TensorRT DirectML CUDA
720x480 ~320 fps ~160 fps ~70 fps
1440x1080 ~80 fps ~50 fps ~32 fps
2880x2160 ~20 fps ~14 fps ~8 fps
Classic
Resolution YUV444 YUV420 GRAY
720x480 ~70 fps ~90 fps ~120 fps
1440x1080 ~15 fps ~20 fps ~25 fps
2880x2160 ~7.5 fps ~11 fps ~14 fps

Third-Party Integrations

Several projects integrated TemporalFix to simplify usage without the need for VapourSynth knowledge. Feel free to contact me if you want to be part of this list.

  • Vapourkit (Windows only)
    Video filter and upscaling program with an easy GUI. This is the easiest way to use it. Just click on add filter and add one of the two TemporalFix versions.
  • Hybrid (Windows and Linux)
    Video filter toolbox with a GUI. Can be a bit overwhelming due to the amount of features and filters, but TemporalFix is one of them.
  • VSGAN-tensorrt-docker (Windows and Linux)
    Command line AI upscale and interpolation toolbox that comes with both versions of TemporalFix. Rudimentary knowledge of Docker and VapourSynth is recommended, but the readme also explains it.
  • mpv-cHiDeNoise-AI (Windows only)
    AI upscaling video player based on mpv, which includes the TemporalFix AI Models and a lighter modified version of TemporalFix Classic for real-time playback. Mainly intended for japanese audience.

Metadata

Release files for vs-temporalfix 2.4.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 vs-temporalfix 2.4.1
File Size Uploaded
vs_temporalfix-2.4.1.tar.gz 11.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for vs-temporalfix 2.4.1
File Interpreter ABI Platform
vs_temporalfix-2.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.7 MB

Release files / vs_temporalfix-2.4.1.tar.gz

Download URL vs_temporalfix-2.4.1.tar.gz
Size 11.4 MB
Tags Source
SHA-256 checksum
How to use checksums
9e46ef4fe8ee0558182f15a2232b929eff064afab62500a86a6a8a4c23d2a81e
BLAKE2b-256 checksum
How to use checksums
6e2b0522a1ae7715c6f563022de2ae4dd94eec31f1e7cf3eb5c6665f06e7defc
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 / vs_temporalfix-2.4.1-py3-none-any.whl

Download URL vs_temporalfix-2.4.1-py3-none-any.whl
Size 11.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e55fe598cc62970ae9bb91f87495496236605cd40a77e3d64ad04c686495ca06
BLAKE2b-256 checksum
How to use checksums
707b42cdcc6fec234b74047f49a50c38398c7e89f231fa90a19ebea0718b702d
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

2.4.1 This release

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 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