yinboc / liif

Learning Continuous Image Representation with Local Implicit Image Function, in CVPR 2021 (Oral)
https://yinboc.github.io/liif/
BSD 3-Clause "New" or "Revised" License
1.28k stars 145 forks source link

Question about load model #26

Open Someone-LikeU opened 3 years ago

Someone-LikeU commented 3 years ago

Hi, I want to use your model to enlarge my image data as middle result, and then use the enlarged one to generate optical flow. So in my .py, I load the model the same way as you showed in demo.py, like: SRmodel = models.make(th.load(args.model)['model'], load_sd=True).cuda() but I get the error KeyError: 'liif', image It almost bothered me for a day, and I could not find out why, can you help me with it? Thank you very much, looking forward to your reply.

924544296 commented 3 years ago

I have the same problem. Have you solved it yet?

niranjanakella commented 3 years ago

@Someone-LikeU Hey, I have tried to load the model in the following way, and it has loaded successfully.

`model_spec = torch.load('/content/edsr-baseline-liif.pth')['model']

model = models.make(model_spec, load_sd=True).cuda()`