Skip to content

Commit

Permalink
Fix return function
Browse files Browse the repository at this point in the history
  • Loading branch information
xhlulu committed Nov 6, 2021
1 parent 1799501 commit b8e3a27
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hubconf.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import torch
from model import Generator


def animegan2(pretrained=True, device="cpu", progress=True, check_hash=True):
from model import Generator

model = Generator()

if type(pretrained) == str:
ckpt_url = pretrained
pretrained = True
Expand All @@ -18,3 +19,5 @@ def animegan2(pretrained=True, device="cpu", progress=True, check_hash=True):
check_hash=check_hash,
)
model.load_state_dict(state_dict)

return model

0 comments on commit b8e3a27

Please sign in to comment.