Update RIFE.py

This commit is contained in:
hzwer
2025-07-25 17:02:10 +08:00
committed by GitHub
parent faf78cd5a1
commit eff2c82671

View File

@@ -53,7 +53,9 @@ class Model:
if rank == 0:
torch.save(self.flownet.state_dict(),'{}/flownet.pkl'.format(path))
def inference(self, img0, img1, scale=1, scale_list=[4, 2, 1], TTA=False, timestep=0.5):
def inference(self, img0, img1, scale=1, scale_list=None, TTA=False, timestep=0.5):
if scale_list is None:
scale_list = [4, 2, 1]
for i in range(3):
scale_list[i] = scale_list[i] * 1.0 / scale
imgs = torch.cat((img0, img1), 1)