Releases: dajes/frame-interpolation-pytorch
Releases · dajes/frame-interpolation-pytorch
v1.0.2 Newer torch version, improved support for dt argument
The model is re-exported with torch 2.1.1
Includes minor fixes:
- Fix UserWarning: Using padding='same' with even kernel lengths and odd dilation may require a zero-padded copy of the input be created
- Now it doesn't ignore dt argument thanks to @niqodea (however it seems that authors of the model recommend to stick with .5)
- Supports batched inference
v1.0 - Initial release
v1.0 - Initial release
Initially exported models in TorchScript compiled format for easy use in all supported environments with a couple of lines of code.
How to use
Download a compiled model and specify the path to the file in the following snippet:
import torch
device = torch.device('cuda')
precision = torch.float16
model = torch.jit.load(model_path, map_location='cpu')
model.eval().to(device=device, dtype=precision)
img1 = torch.rand(1, 3, 720, 1080).to(precision).to(device)
img3 = torch.rand(1, 3, 720, 1080).to(precision).to(device)
dt = img1.new_full((1, 1), .5)
with torch.no_grad():
img2 = model(img1, img3, dt) # Will be of the same shape as inputs (1, 3, 720, 1080)