Skip to content

Error when using my own image #72

@munib94

Description

@munib94

Hi,

When I execute the following command on a blurry image:

python main.py --ni --config imagenet_256_cc.yml --path_y ../../../artifacts_dataset/small_dataset/val/0145.jpg --eta 0.85 --deg "deblur_gauss" --deg_scale 2.0 --sigma_y 0.1 -i demo

I get the following error:

INFO - main.py - 2024-05-02 02:24:38,466 - Using device: cuda
2.21GB [02:55, 12.6MB/s]                                                                                                                                                                                                                                                                                   
ERROR - main.py - 2024-05-02 02:27:39,674 - Traceback (most recent call last):
  File "main.py", line 166, in main
    runner.sample(args.simplified)
  File "/home/user/MSU/Research/DDNM/guided_diffusion/diffusion.py", line 161, in sample
    model.load_state_dict(torch.load(ckpt, map_location=self.device))
  File "/home/user/.pyenv/versions/ddnm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2189, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for UNetModel:
        Missing key(s) in state_dict: "label_emb.weight". 

Can you tell me what I am doing wrong here? I am using the pretrained model for restoring general images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions