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

Unable to load pretrained model #149

Open
hariharan849 opened this issue Oct 18, 2023 · 0 comments
Open

Unable to load pretrained model #149

hariharan849 opened this issue Oct 18, 2023 · 0 comments

Comments

@hariharan849
Copy link

hariharan849 commented Oct 18, 2023

Hi
I am trying to load the pre trained model to pytorch and i am getting unable to find constants.pkl

import torch;
model = torch.jit.load('/content/sample_data/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
[<ipython-input-7-c57f9e5ce4f8>](https://localhost:8080/#) in <cell line: 2>()
      1 import torch
----> 2 model = torch.jit.load('/content/sample_data/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth')

[/usr/local/lib/python3.10/dist-packages/torch/jit/_serialization.py](https://localhost:8080/#) in load(f, map_location, _extra_files, _restore_shapes)
    160     cu = torch._C.CompilationUnit()
    161     if isinstance(f, (str, pathlib.Path)):
--> 162         cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files, _restore_shapes)  # type: ignore[call-arg]
    163     else:
    164         cpp_module = torch._C.import_ir_module_from_buffer(

RuntimeError: PytorchStreamReader failed locating file constants.pkl: file not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant