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

Error when using image_512_cc.yml #8

Open
mateibejan1 opened this issue Jul 21, 2022 · 3 comments
Open

Error when using image_512_cc.yml #8

mateibejan1 opened this issue Jul 21, 2022 · 3 comments

Comments

@mateibejan1
Copy link

I've tested you model on all available configurations in Google Colab and got this when running image_512_cc.yml.

Error when using image_256_cc.yml #7
ERROR - main.py - 2022-07-21 11:16:31,872 - Traceback (most recent call last):
  File "main.py", line 164, in main
    runner.sample()
  File "/content/ddrm/runners/diffusion.py", line 135, in sample
    model.load_state_dict(torch.load(ckpt, map_location=self.device))
  File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 713, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 920, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\xef'.

Could you recommend a possible fix?

@jiamings
Copy link
Collaborator

I suspect this is due to the pickle file not being downloaded properly.

@mateibejan1
Copy link
Author

I've tested it locally and the problem persists, so it isn't related to Colab's I/O throughput.

@mateibejan1
Copy link
Author

Found the source of this behaviour: a code in /runners/diffusion.py at line 128:

download('https://openaipublic.blob.core.windows.net/diffusion/jul-2021/%dx%d_diffusion_uncond.pt' % (self.config.data.image_size, self.config.data.image_size), ckpt)
. Instead of downloading the class-conditioned conditioned diffusion checkpoint, you download the unconditional one.

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

2 participants