Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mixin #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion model/flow_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from .warplayer import warp
from .refine import *

from huggingface_hub import PyTorchModelHubMixin

def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dilation=1):
return nn.Sequential(
nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, stride=stride,
Expand Down Expand Up @@ -42,7 +44,7 @@ def forward(self, motion_feature, x, flow): # /16 /8 /4
return flow, mask


class MultiScaleFlow(nn.Module):
class MultiScaleFlow(nn.Module, PyTorchModelHubMixin, repo_url="https://github.com/MCG-NJU/EMA-VFI", pipeline_tag="video-frame-interpolation"):
def __init__(self, backbone, **kargs):
super(MultiScaleFlow, self).__init__()
self.flow_num_stage = len(kargs['hidden_dims'])
Expand Down