bahjat-kawar / ddrm

[NeurIPS 2022] Denoising Diffusion Restoration Models -- Official Code Repository
MIT License
574 stars 53 forks source link

Error when using image_256_cc.yml #7

Closed mateibejan1 closed 2 years ago

mateibejan1 commented 2 years ago

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

ERROR - main.py - 2022-07-21 11:00:58,211 - 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/nn/modules/module.py", line 1605, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for UNetModel:
    Missing key(s) in state_dict: "label_emb.weight". 

Could you recommend a possible fix?

mateibejan1 commented 2 years ago

Same solution as issue #8: Error when using image_512_cc.yml.